Project #1: Choose Your Own Slightly Longer Adventure

Code

    /// Name: Kelsey Lieberman
    /// Period 5
    /// Program Name: LongerAdventure
    /// File Name: LongerAdventure.java
    /// Date Finished: 12/3/2015
    
import java.util.Scanner;

public class LongerAdventure
{
    public static void main(String[] args)
    {
        Scanner keyboard = new Scanner(System.in);
        
        String temp;
        
        String r1="sleep", r2="teacher", r3="doodle", r4="upstairs", r5="downstairs", r6="answer", r7="dip", r8="s", r9="teacher", r10="left", r11="right", r12="fridge", r13="pantry", r14="laugh", r15="answer", r16="window", r17="door", r18="s", r19="send", r20="her", r21="joke", r22="yes", r23="no", r24="yes", r25="no", r26="scrambled", r27="over-easy", r28="yes", r29="no", r30="leave", r31="stay", r32="explain", r33="continue", r34="haystack", r35="mattress", r36="sprint", r37="fight", r38="yes", r39="no", r40="fistbump", r41="handshake", r42="yes",r43="no", r44="first", r45="second";
        
        System.out.println("WELCOME TO KELSY'S SECOND FREAKIN CRAZY ADVENTUREEEEEE ");
        System.out.println("\nYou wake up in a boring history classroom! Do you want to go back to \"sleep\", look at the \"teacher\", or \"doodle\" in your notebook?");
        System.out.print(">> ");
        
        temp = keyboard.nextLine();
        
        if (temp.equals(r1))
        {
            System.out.println("\nYou fall asleep and in your dream you wake up in a dark and unfamiliar room. Do you want to go \"upstairs\" or \"downstairs\" in the dream? ");
            System.out.print(">> ");
            
            temp = keyboard.nextLine();
            
                if (temp.equals(r4))
                {
                    System.out.println("\nYou walk upstairs and find a door on your \"left\" and a door on your \"right\". Which would you like to enter?");
                    System.out.print(">> ");
                    
                    temp = keyboard.nextLine();
                    
                        if (temp.equals(r10))
                        {
                            System.out.println("\nYou open the door on your left and find a pile of dank memes. Would you like to examine them? (\"yes\" or \"no\")");
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                            
                                if (temp.equals(r22))
                                {
                                    System.out.println("\nYou find the rarest pepe! What a great dream!");
                                }
                                else if (temp.equals(r23))
                                {
                                    System.out.println("\nYou wake up covered in your own drool. Nice.");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"yes\" or \"no\"");
                                }
                        }
                        else if (temp.equals(r11))
                        {
                            System.out.println("\nYou open the door to find a skeleton musician performer playing the trumpet. Would you like to put money in his hat? (\"yes\" or \"no\")");
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                            
                                if (temp.equals(r24))
                                {
                                    System.out.println("\nYou wake up and your ostheroperosis has gone away... Your bones finally feel strong again! ");
                                }
                                else if (temp.equals(r25))
                                {
                                    System.out.println("\nYou wake up unable to maove. Your bones feel weak, as though you had some sort of severe calcium deficciency...");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"yes\" or \"no\"");
                                }
                        }
                        else
                        {
                            System.out.println("\nPlease enter either \"left\" or \"right\"");
                        }
                }
                else if (temp.equals(r5))
                {
                    System.out.println("\nYou go downstairs to find yourself in a kitchen. You feel hungry. Do you want to check the \"fridge\" or the \"pantry\" for food?");
                    System.out.print(">> ");
                    
                    temp = keyboard.nextLine();
                    
                        if (temp.equals(r12))
                        {
                            System.out.println("\nYou open the fridge to find milk and eggs that don't expire for a week or so. You decide to make eggs. Do you want them \"scrambled\" or \"over-easy\"?");
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                                                       
                                if (temp.equals(r26))
                                {
                                    System.out.println("\nGood choice. That is the best way; anyone who prefers over-easy doesn't deserve eggs.");
                                }
                                else if (temp.equals(r27))
                                {
                                    System.out.println("\nYou bite into your first egg, but yolk is too hot and burns you to death.");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"scrambled\" or \"over-easy\"");
                                }
                        }
                        else if (temp.equals(r13))
                        {
                            System.out.println("\nYou open the pantry to find it infested with a colony of rats. One of them offers to help you cook. Do you want to let him help you cook? (\"yes\" or \"no\")");
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                                                       
                                if (temp.equals(r28))
                                {
                                    System.out.println("\nThe rat climbs into your hair and uses it to control all of your movement. He makes you cook a delicious meal.");
                                }
                                else if (temp.equals(r29))
                                {
                                    System.out.println("\nThe rats swarm and eat you.");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"yes\" or \"no\"");
                                }
                        }
                        else
                        {
                            System.out.println("\nPlease enter either \"fridge\" or \"pantry\"");
                        }
                }
                else
                {
                    System.out.println("\nPlease enter either \"upstairs\" or \"downstairs\"");
                }
        }
        
        else if (temp.equals(r2))
        {
            System.out.println("\n You pretend to be focused and make eye contact with the teacher... Oh no! The teacher looks like she is about to ask you a question! Do you want to try to \"answer\" or \"dip\"?");
            System.out.print(">> ");
            
            temp = keyboard.nextLine();
                
                if (temp.equals(r6))
                {
                    System.out.println("\nThe teacher calls on you and asks, \"Who are the natives of djibouti?\" ... Do you \"laugh\" because it's a funny question, or \"answer\" the question?");
                    System.out.print(">> ");
                    
                    temp = keyboard.nextLine();
                    
                        if (temp.equals(r14))
                        {
                            System.out.println("\nYou burst out laughing, but no one else does. Do you want to \"leave\" or \"stay\"? ");
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                                                       
                                if (temp.equals(r30))
                                {
                                    System.out.println("\nYou get out of your seat and go home cuz screw it, these people don't know humor anyways. heh... djibouti... ");
                                }
                                else if (temp.equals(r31))
                                {
                                    System.out.println("\nYou sit there still smiling at djibouti, while everyone stares at you. That ok though, because this isn't real. Nothing is real. You sink through your chair and fade into the universe.");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"leave\" or \"stay\"");
                                }
                        }
                        else if (temp.equals(r15))
                        {
                            System.out.println("\nYou tell the teacher that her mother is a native to djibouti. The teacher is offended and says that is inappropriate. Would you like to \"explain\" your answer, or \"continue\" with the comebacks because you're on a freakin roll.");
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                                                       
                                if (temp.equals(r32))
                                {
                                    System.out.println("\nYou explain to the teacher that her mother is in fact a literal native to djibouti. You show her a family tree proving her mother's heritage and tracing it back to djibouti origin, thereby answering the question correctly.");
                                }
                                else if (temp.equals(r33))
                                {
                                    System.out.println("\n You say, \"You're mom is inappropriate\" and your teacher is most highly offended. You walk out like you just dropped the mic because you know the teacher cant handle your level.");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"explain\" or \"continue\"");
                                }
                        }
                        else
                        {
                            System.out.println("\nPlease enter either \"laugh\" or \"answer\"");
                        }
                }
                else if (temp.equals(r7))
                {
                    System.out.println("\nYou really don't feel like answering questions. You jump out of your seat and sprint to the door, but it is locked. Do you want to climb out the \"window\" or kick the \"door\" down?");
                    System.out.print(">> ");
                    
                    temp = keyboard.nextLine();
                    
                        if (temp.equals(r16))
                        {
                            System.out.println("\nYou sprint and dive out the window. You forgot you are on the second story. In midair you see a \"haystack\" and a pile of \"matresses\". Which do you want to land in?");  
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                                                       
                                if (temp.equals(r34))
                                {
                                    System.out.println("\nYou land comfortably in a haystack. You then climb onto the horse eating from the haystack and ride off into the sunset.");
                                }
                                else if (temp.equals(r35))
                                {
                                    System.out.println("\nYou land on the pile of matresses and are impaled by a pitchfork, initially hidden by the matress covering it. Shucks!");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"haystack\" or \"matress\"");
                                }
                        }
                        else if (temp.equals(r17))
                        {
                            System.out.println("\nYou kick the door down in one kick because you're a freakin baller. Two security guards come to stop you from getiing away. Do you want to try to \"sprint\" past them or \"fight\"?");
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                                                       
                                if (temp.equals(r36))
                                {
                                    System.out.println("\nYou try to sprint past the guards but they clothesline and taser you. Too bad.");
                                }
                                else if (temp.equals(r37))
                                {
                                    System.out.println("\nYou do some sick karate moves and knock both guards out. Nice. You calmly walk off campus while everone stares in awe. No one ever sees you again.");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"sprint\" or \"fight\"");
                                }
                        }
                        else
                        {
                            System.out.println("\nPlease enter either \"window\" or \"door\"");
                        }
                }
                else
                {
                    System.out.println("\nPlease enter either \"answer\" or \"dip\"");
                }    
            }
        else if (temp.equals(r3))
        {
            System.out.println("\nYou find a blank space in your notebook for drawing pictures. Do you want to draw that cool block \"s\" thing or draw a picture of your \"teacher\"?");
            System.out.print(">> ");
            
            temp = keyboard.nextLine();
            
                if (temp.equals(r8))
                {
                    System.out.println("\nYou draw that cool \"s\" thing. It's really good. Do you want to draw \"another\" or do you want to \"send\" a picture of your drawing to the International Art Association");
                    System.out.print(">> ");
                    
                    temp = keyboard.nextLine();
                    
                        if (temp.equals(r18))
                        {
                            System.out.println("\nYou draw another one. This one is really good too! You feel an urge to draw another one. Do you want to draw another one? (\"yes\" or \"no\")"); 
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                                                       
                                if (temp.equals(r38))
                                {
                                    System.out.println("\nYou draw another one. Then another one. And another. You can't stop yourself! you keep drawing more and more until there isn't even any lead left in your penicil, but you still can't stop. You keep drawing them and your pencil wear down to a nub. At this point, you are just making the motions with your hand, the pencil is gone. You can't stop! The drawing motion on your paper wears your hand down to the bones, the \"s\"'s are still coming out amazingly, but now they are being written in your blood because you can't stop writing and your arm is being worn down to nothing more than a nub.");
                                }
                                else if (temp.equals(r39))
                                {
                                    System.out.println("\nYou stop drawing the \"s\"'s and draw a funny picture of your teacher. That girl behind you sees it and laughs. Nice.");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"yes\" or \"no\"");
                                }
                        }
                        else if (temp.equals(r19))
                        {
                            System.out.println("\nThe International Art Association assembles the world's greatest artists to evaluate your drawing. 100% of the artists think your \"s\" looks freaking sick. They send it to the president of the United States, who loves it so much that he invites you to the White House for dinner. You go to the white house, and, holy moly, Snoop Dogg is there! You walk up to Snoop Dogg and introduce yourself. Do you want to go for the \"fistbump\" or \"handshake\"?");
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                                                       
                                if (temp.equals(r40))
                                {
                                    System.out.println("\nYou hold up your fist for a fist bump, but it is evident that Snoop Dogg was going in for the handshake. He laughs it off to make you feel better, cuz he's a nice guy, but you know you just embarassed yourself in front of Snoop Dogg. Not cool.");
                                }
                                else if (temp.equals(r41))
                                {
                                    System.out.println("\nSnoop Dogg was goin for the handshake; good thing you didn't go for the fistbump. Snoop Dogg invites you to hang with him at an afterparty. Dank. ");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"fistbump\" or \"handshake\"");
                                }
                        }
                        else
                        {
                            System.out.println("\nPlease enter either \"another\" or \"send\"");
                        }
                }
                else if (temp.equals(r9))
                {
                    System.out.println("\nYou draw a funny picture of your teacher. She sees it as she is walking by and asks who it is. Do you want to say it is \"her\" or tell a \"joke\" to diffuse tension?");
                    System.out.print(">> ");
                    
                    temp = keyboard.nextLine();
                    
                        if (temp.equals(r20))
                        {
                            System.out.println("\nShe is offended and asks to see you after school. Are you going to go see her after class? (\"yes\" or \"no\")");
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                            
                                if (temp.equals(r42))
                                {
                                    System.out.println("\nYou see her after school and she wastes your time by telling you it is not a \"valuable use of class time\", as though she is one to judge what is important. Like that'll get you to stop drawing in class.");
                                }
                                else if (temp.equals(r43))
                                {
                                    System.out.println("\nYou don't feel like seeing her after school, so you don't. She gives you a warning the next day and tells you to come after school again, but you don't feel like staying after school that day either, so you don't. This has no long term effect on your life, and you never think about it again.");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either \"yes\" or \"no\"");
                                }
                        }
                        else if (temp.equals(r21))
                        {
                            System.out.println("\nYou think of two jokes. Which one do you want to tell? The \"first\" joke, or the \"second\" joke?");
                            System.out.print(">> ");
                            
                            temp = keyboard.nextLine();
                            
                                if (temp.equals(r44))
                                {
                                    System.out.println("\nYou: guess what?\nTeacher: what?\nYou: chicken butt!\nWhole Class: hahalolhegotchuuuuuuuuu!!");
                                }
                                else if (temp.equals(r45))
                                {
                                    System.out.println("\nYou: Why does it take so long for pirates to learn the alphabet? \nTeacher: Why? /nYou: lol cuz they spend years at C!");
                                }
                                else
                                {
                                    System.out.println("\nPlease enter either\"first\" or \"second\"");
                                }
                        }
                        else
                        {
                            System.out.println("\nPlease enter either \"her\" or \"joke\"");
                        }
                }
                else
                {
                    System.out.println("\nPlease enter either \"s\" or \"teacher\"");
                }
        }
        else
        {
            System.out.println("\nPlease enter: \"sleep\" or \"teacher\" or \"doodle\"");
        }
    }
}
    

Picture of the output

Project 1