Assignment #45 and Forty-Second Program

Code

        /// Name: Georgi Atanasov
        /// Period: 5
        /// Program Name: Choose Your Own Adventure!
        /// File Name: ChooseYourOwnAdventure.java
        /// Date Finished: 12/1/2015
    
    import java.util.Scanner;

    public class ChooseYourOwnAdventure
    {
        public static void main(String[] args)
        {
            Scanner keyboard = new Scanner(System.in);
            
            String r1, r2, r3, r4, r5, r6, r7;
            
            System.out.println("WELCOME TO GEORGI'S HUGE AF ADVENTURE!");
            System.out.println();
            System.out.println("You are in school and late to class! Would you like to go to \"class\" or to the \"bathroom\"?");
            r1 = keyboard.next();
            
            System.out.println();
            
            if (r1.equals("class"))
            {
                System.out.println("You enter the classroom and the class laughs at you for no reason. You may go to your \"seat\" or to \"sit on someone else\".");
                r2 = keyboard.next();
                
                System.out.println();
                
                if (r2.equals("seat"))
                {
                    System.out.println("You sit down and the teacher asks where you were. Would you like to answer? (\"yes\" or \"no\")");
                    r3 = keyboard.next();
                    
                    System.out.println();
                    
                    if (r3.equals("yes"))
                    {
                        System.out.println("You were flirting with anything that moved. Now, you got mad chicks and you don't care about class anymore. Thanks for playing!");
                    }
                    else if (r3.equals("no"))
                    {
                        System.out.println("You sit in the corner and die. Thank you for playing!");
                    }
                }
                else if (r2.equals("sit on someone else"))
                {
                    System.out.println("You enter and sit on your best friend. Would you like to ask them for a pencil? (\"yes\" or \"no\")");
                    r4 = keyboard.next();
                    
                    System.out.println();
                    
                    if (r4.equals("yes"))
                    {
                        System.out.println("You build an empire and enslave the unicorns. Thank you for playing!");
                    }
                    else if (r4.equals("no"))
                    {
                        System.out.println("You frolic through the fields until realizing you can't exit your happy place, eventually becoming an ancient sage. Thank you for playing!");
                    }
                }
            }
            else if (r1.equals("bathroom"))
            {
                System.out.println("You go to check yourself out in the mirror when you remember you needed to go to class. You may go and \"return\" or \"escape\" and go home.");
                r5 = keyboard.next();
                
                System.out.println();
                
                if (r5.equals("return"))
                {
                    System.out.println("You return and everything resumes as normal. Would you like to ask a question? (\"yes\" or \"no\")");
                    r6 = keyboard.next();
                    
                    System.out.println();
                    
                    if (r6.equals("yes"))
                    {
                        System.out.println("You ask what you missed but nobody cares. Thank you for playing!");
                    }
                    else if (r6.equals("no"))
                    {
                        System.out.println("You sit there and accept life. Thank you for playing!");
                    }
                }
                else if (r5.equals("escape"))
                {
                    System.out.println("You ditch and start walking. Would you like to go downtown? (\"yes\" or \"no\")");
                    r7 = keyboard.next();
                    
                    System.out.println();
                    
                    if (r7.equals("yes"))
                    {
                        System.out.println("You buy Starbucks and feel like a white girl. Thank you for playing!");
                    }
                    else if (r7.equals("no"))
                    {
                        System.out.println("You wander downtown until you get bored. Thank you for playing!");
                    }
                }
            }
        }
    }
    

Picture of the output

Assignment 45