Assignemnt #53

Code

/// Name: Connor Siri
/// Period: 7
/// Program Name: Longer
/// File Name: Longer.java
/// Date Finished: 10/26/2015
import java.util.Scanner;
class Longer{

    public static void main(String[] args) {
    
        Scanner keyboard = new Scanner(System.in);
        
        String a, b, c;
        
        System.out.println("");
        System.out.println("");
        System.out.println("Welcome to the wildest adventure ever");
        System.out.println("");
        System.out.println("You walk into an old abandoned house, their is a stair case going up, down, and a hallway straight ahead. Do you go (up or down or straight)");
        System.out.print("> ");
        a = keyboard.next();
        
        if (a.equals("up"))
        {
        System.out.println("You go up the stairs and see that their is a door to the left and right. Which way do you go");
        System.out.print("> ");
        b = keyboard.next();
        
        if (b.equals("left"))
        {
        System.out.println("You go through the door and notice a hole in the floor and you can see the ground below is covered in spikes. While you are looking down the door closes and becomes locked. Do you except your fate and jump in the hole or do you try and find another way out. (jump or find)");
        System.out.print("> ");
        c = keyboard.next();
        
        if (c.equals("jump"))
        {
        System.out.println("You jump in the hole but the spikes were just an illusion and you land softly on a bed. You then leave the house and never return.");
        }
        else if (c.equals("find"))
        {
        System.out.println("You pick up a board and try to open the door. You are able to get the door open but you cut yourself in the process. You leave the house and never return but the cut gets infected and you soon die.");
        }
        }
        else if (b.equals("right"))
        {
        System.out.println("You try to open the door but it is locked. Do you leave or do you try and kick the door down? (leave or kick)");
        System.out.print("> ");
        c = keyboard.next();
            
            if (c.equals("leave"))
            {
                System.out.println("You fall down the stairs and die");
            }
            else if (c.equals("kick"))
            {
                System.out.println("You try to kick open the door but you do it wrong and break your leg. You pass out from the pain and while you are asleep you are hanged");
            }
        }
            }
        
        else if (a.equals("down"))
        {
            System.out.println("You go down the stairs to the basement and you notice that their is a mirror and a closet. Do you break the mirror or open the closet? (mirror or closet)");
            System.out.print("> ");
            b = keyboard.next();
            
            if (b.equals("mirror"))
            {
                System.out.println("You break the mirror and notice that there is secret room behind it do you go in or search more. (go or search)");
                System.out.print("> ");
                c = keyboard.next();
                
                if (c.equals("go"))
                {
                    System.out.println("You walk into the room and a guillotine cuts you in half. 7 years of bad luck in a second.");
                }
                else if (c.equals("search"))
                {
                    System.out.println("You are killed when the evil clown sneaks up on you and stabes you in the back.");
                }
            }
            else if (b.equals("closet"))
            {
                System.out.println("You open the closet and see the evil clown sleeping do you wake him or kill him. (wake or kill)");
                System.out.print("> ");
                c = keyboard.next();
                
                if (c.equals("wake"))
                {
                    System.out.println("You wake the evil clown and find that he isn't evil, he leads you out of the house and you are safe. Just kidding, the clown brutally kills you while you watch in the mirror.");
                }
                else if (c.equals("kill"))
                {
                    System.out.println("You pick up a sharp piece of metal and slit his throat, blood sprays all over your face. But his blood is acid like in the movie Aliens and it melt your face off.");
                }
            }
        }
        
        else if (a.equals("straight"))
        {
            System.out.println("You walk into a room with a box on one side and a bunch of grails on the other side.Do you open the (box) or go to the (grails)");
            System.out.print("> ");
            b = keyboard.next();
            
            if (b.equals("box"))
            {
                System.out.println("Inside the box is the Arc of the Covinent. do you (leave) it or (open) it?");
                System.out.print("> ");
                c = keyboard.next();
                
                if (c.equals("leave"))
                {
                    System.out.println("You leave it and as you leave Nazi's kill you");
                }
                else if (c.equals("open"))
                {
                    System.out.println("Your face melts off like in Indiana Jones");
                }
            }
                else if (b.equals("grails"))
                {
                    System.out.println("You walf up to the grails and notice a sign that reads 'one of these cups is the holy grail. chose wisly.' do you (leave) or (drink)");
                    System.out.print("> ");
                    c = keyboard.next();
                    
                    if (c.equals("leave"))
                    {
                        System.out.println("Nazi's kill you as you leave");
                    }
                    else if (c.equals("drink"))
                    {
                        System.out.println("You chose wrong and your body ages quickly and falls apart like in Indiana Jones");
                    }
                }
            }
    }
}
            
    


        
    

Picture of the output

Assignment10.html