Assignment #45 Choose Your Own Adventure!

Code

    /// Name: John Huh
    /// Period: 6
    /// Program Name: Choose Your Own Adventure!
    /// File Name: Adventure.java
    /// Date Finished: 10/19/2015

        import java.util.Scanner;
    
        public class Adventure
        {
            public static void main( String[] args )
            {
            
                Scanner keyboard = new Scanner(System.in);
                String R1, R2, R3;
            
                System.out.println( "WELCOME TO JOHN'S TINY ADVENTURE!" );
                System.out.println();
                System.out.println( "School has just ended.  Do you want to go to ''Pancoast'', or head ''downtown''?" );
                System.out.print( "> " );
                R1 = keyboard.next();
                if ( R1.equals("Pancoast") )
                {
                    System.out.println();
                    System.out.println( "You open the entrance and decide to order a slice. You are offered to either take a slice ''to go'' or ''stay'' and eat the pizza there. Which will you choose?" );
                    System.out.print( "> " );
                    R2 = keyboard.next();
                    if ( R2.equals("to go") )
                    {
                        System.out.println();
                        System.out.println( "As you eat your slice on your way home, you contemplate as to whether or not you should walk to your ''mom's'' or ''dad's'' house. Whose house will you go to?" );
                        System.out.print( "> " );
                        R3 = keyboard.next();
                        if ( R3.equals("mom's") )
                        {
                            System.out.println();
                            System.out.println( "You arrive at your mom's house at around 4:30." );
                        }
                    
                        if ( R3.equals("dad's") )
                        {
                            System.out.println();
                            System.out.println( "You arrive at your dad's house at around 5:00." );
                        }
                    }
                
                    if ( R2.equals("stay") )
                    {
                        System.out.println();
                        System.out.println( "After you get your slice, your friends join you at a table. As you talk for a few hours, you realize that you should be home soon.  Your friends decide to walk home with you, but you then realize that you don't know if you will go to your ''mom's'' house or your ''dad's''.  Whose house will you go to?" );
                        System.out.print( "> " );
                        R3 = keyboard.next();
                        if ( R3.equals("mom's") )
                        {
                            System.out.println();
                            System.out.println( "You arrive at your mom's house at around 6:00." );
                        }
                    
                        if ( R3.equals("dad's") )
                        {
                            System.out.println();
                            System.out.println( "You arrive at your dad's house at around 6:30." );
                        }
                    }
                }
                if ( R1.equals("downtown") )
                {
                    System.out.println();
                    System.out.println( "As you walk downtown, you notice that there is a movie that you want to see is in theaters.  Do you go see it? (''yes '' or ''no''" );
                    System.out.print( "> " );
                    R2 = keyboard.next();
                    if ( R2.equals("yes") )
                    {
                        System.out.println();
                        System.out.println( "After the movie, you realize that you need to decide which of you parents' houses you will be going to.  Will you got your ''mom's'' or your ''dad's''?" );
                        System.out.print( "> " );
                        R3 = keyboard.next();
                        if ( R3.equals("mom's") )
                        {
                            System.out.println();
                            System.out.println( "You arrive at your mom's house at around 7:30." );
                        }
                    
                        if ( R3.equals("dad's") )
                        {
                            System.out.println();
                            System.out.println( "You arrive at your dad's house at around 8:15." );
                        }
                    }
                
                    if ( R2.equals("no") )
                    {
                        System.out.println();
                        System.out.println( "As you continue to walk around downtown for the next hour, you realize that nothing else seems of interest to you and decide to go home. You then realize that you need to either go to your ''mom's'' house or your ''dad's''.  Whose will you go to?" );
                        System.out.print( "> " );
                        R3 = keyboard.next();
                        if ( R3.equals("mom's") )
                        {
                            System.out.println();
                            System.out.println( "You arrive at your mom's house at around 5:00." );
                        }
                    
                        if ( R3.equals("dad's") )
                        {
                            System.out.println();
                            System.out.println( "You arrive at your dad's house at around 5:45." );
                        }
                    }
                }
            }
        }
    

Picture of the output

Assignment 1