Assignemnt #45

Code

/// Name: Ryan Volko
/// Period: 7
/// Program Name: Choose
/// File Name: Choose.java
/// Date Finished: 10/14/2015
import java.util.Scanner;
class Choose{

    public static void main(String[] args) {
    
    Scanner keyboard = new Scanner(System.in);
    
   String a, s, d, f, g, h, j; 
        
        System.out.println("");
        System.out.println("");
        System.out.println("");
        System.out.println("");
        System.out.println("    Welcome to the Asylum");
        System.out.println("Let's have some fun");
           
        System.out.println("You are in the asylum and there are two doors, do you go (left or right)");
        System.out.print("> ");
        a = keyboard.next();
        System.out.println("");
        
        if (a.equals("right"))
        {
        System.out.println("When you go right, there are two weapons (hammer or sword)");
        System.out.print("> ");
        s = keyboard.next();
        System.out.println("");
            
            if (s.equals("hammer"))
                {
                    System.out.println("You notice a steel box do you (smash_it or leave_it)");
                    System.out.print("> ");
                    d = keyboard.next();
                    System.out.println("");
                    
                    if ( d.equals("smash_it"))
                    {
                        System.out.println("The your hammer broke and a mutant spider stabs you as you can't defend yourself!");
                    }
                else if (d.equals("leave_it"))
                {
                    System.out.println("A physco squirrel man snaps your neck after jumping from the box!");
                }
            }
            else if (s.equals("sword"))
            {
                System.out.println("You see a pig hanging from a hook (leave or kill)");
                System.out.print("> ");
                j = keyboard.next();
                System.out.println("");
                
                if (j.equals("leave"))
                {
                    System.out.println("The police bust in as they mistake it for a man and you get sent to prison to die by prison shank.!");
                }
                else if (j.equals("kill"))
                {
                    System.out.println("there is a key in the body and you escape to live.");
                }
            }
        }
            else if (a.equals("left"))
                           {
                               System.out.println("You see a unconious woman do you (wake or leave)");
                               System.out.print("> ");
                               f = keyboard.next();
                               System.out.println("");
                               
                               if (f.equals("wake"))
                               {
                                   System.out.println("The woman wakes and wants to lead you to safety do you (go_with or stay).");
                               System.out.print("> ");
                                g = keyboard.next();
                                   System.out.println("");
                                
                                   if (g.equals("stay"))
                                   {
                                       System.out.println("The woman kills you for not accepting her offer");
                                   }
                                   else if (g.equals("go_with"))
                                   {
                                       System.out.println("She leads you to safety where you get married and have three kids and on her deathbed from cancer she leans in and whispers to you 'I never loved you' and kills you");
                                   }
                               }
                               else if (f.equals("leave"))
                               {
                                   System.out.println("you come up to two open doors on that says exit and one that has a room with spiders which room (exit or spiders)");
                                   System.out.print("> ");
                                   h = keyboard.next();
                                   System.out.println("");
                                   
                                   if (h.equals("exit"))
                                   {
                                       System.out.println("You hit a solid wall and the woman you left kills you from behind");
                                   }
                                   else if (h.equals("spiders"))
                                   {
                                       System.out.println("You leave after living a real nightmare and soon realize the woman you abandoned was your wife so you go back to the house and find the house is burned down so you fall into a depression where alchol ruins your life and you commit sucide.");
                                   }
                               }
                           }
                           else 
                           {
                               System.out.println("You didn't play the game so you died.");
                           }
                           System.out.println("");
                           System.out.println("Don't go into creepy play houses");
                           
                           }
                           }
        
    

Picture of the output

Assignment 45