Assignemnt #77 and Own Adv 2

Code

///name: Ben Borglin
///period: 6
///Program name: Own Adventure part 3
///file name: OwnAdv3.java
///Date finished: 10/28/15

import java.util.Scanner;

public class OwnAdv3
{
	public static void main( String[] args )
	{
		Scanner keyboard = new Scanner(System.in);
		
		int nextroom = 1;
		String choice = "";

		while ( nextroom != 0 )
		{
			if ( nextroom == 1 )
			{
				System.out.println( "You are lost in a zombie infested school. You are stuck in room 406." );
                System.out.println("Would you like to get out of the classroom or jump out the window.(classroom or window)");
				System.out.print( "> " );
				choice = keyboard.nextLine();
				if ( choice.equals("classroom") )
					nextroom = 2;
				else if ( choice.equals("window") )
					nextroom = 3;
				else
					System.out.println( "ERROR." );
			}
			if ( nextroom == 2 )
			{
				System.out.println( "Once out of the classroom there is no place to go because the hallways are filled with zombies. Just head back. say (back)." );
				System.out.print( "> " );
				choice = keyboard.nextLine();
				if ( choice.equals("back") )
					nextroom = 1;
				else
					System.out.println( "ERROR." );
			}
            if ( nextroom == 3 )
            {
             System.out.println("Exiting the window you catch the attention of three fast zombies.(back or run).");
                System.out.print("> ");
                choice = keyboard.next();
                if ( choice.equals("back") )
                {
                    nextroom = 5;
                }
                else if ( choice.equals("run") )
                {
                    nextroom = 4;
                }
                else 
                {
                    System.out.println("ERROR");
                }
            }
            if (nextroom == 4 )
            {
                System.out.println("You have out ran the zombies and made it to your car.");
                System.out.println("You turn on the car and everything goes black.");
                System.out.println("You exited from you life. You realised that everything in the past was a lie.");
                System.out.println("It was a video game experiment that you signed up for.");
                System.out.println("It felt like you lived 15 years in the life of a human while it was an hour in game time.");
                System.out.println("You are very confussed and kill yourself later that night.");
                System.out.println("It turns out that it was another game too. You are a super rich and famous man to be the first one to wake up from");
                System.out.println("the double video game life. Your loving family cures your insanity and you continue a happy life.");
                nextroom = 0;
            }
            if (nextroom == 5)
            {
                System.out.println("Back in the classroom Mr. Davis just finished a program on how to survive a zombie outbreak.");
                System.out.println("Playing his game you get info on how to kill zombies.");
                System.out.println("Heading outside the classroom you find 50 slow zombies.(kill or run).");
                System.out.print(">");
                choice = keyboard.next();
                if (choice.equals("kill"))
                    nextroom = 6;
                else if(choice.equals("run"))
                    nextroom = 7;
                else 
                    System.out.println("ERROR!");
            }
            if (nextroom == 6)
            {
                    System.out.println("You go ham and kill everything in sight.");
                    System.out.println("You find a beautiful girl (LIKE SUPER DUPER HAWT), but she is surrounded by 6 Troll zombies (Really big and deadly). You go in to attack because I am to lazy to give you a choice.");
                    System.out.println("You rekt every one of their stupid faces and get a babe GRATZ!");
                        nextroom = 0;
                    
            }
            if (nextroom == 7)
            {
                System.out.println("You ditched a really cool oppertunity to be a hero. But get out.");
                nextroom = 0;
            }
                
                
        }
        System.out.println( "\nEND." );
    }
}


    

	
	



    

Picture of the output

Assignment 77