Assignemnt #P1 Create Your Own Slightly Longer Adventure

Code

    ///Name: Prooz Fereydouni
    ///Period: 7
    ///Project Name: Create Your Own Slightly Longer Adventure
    ///File Name: CYOSLA.java
    ///Date: 11/16/2015
  
import java.util.Scanner;

public class CYOSLA
{
    public static void main( String[] args )
    {
        String answer;
        Scanner keyboard = new Scanner(System.in);
        System.out.println("WELCOME MAZERUNNER!");
        
        System.out.println("");
        
        String response="";
        
        String Beginning="You have been banished from your country and have been exiled to a maze. You have three paths in front of you. Do you choose the \"right\" one, the \"middle\" one, or the \"left\" one?";
        
        String S1="You have chosen the Left Path. You run for a while until you reach a two way. On the \"left\" you see an old path with a lot of weed and grass on its walls. On the \"right\" you see a clean path. Which path do you choose?";
        
        String S2="You have chosen the Middle Path. You walk for a while but you get thirsty. Do you drink the \"limited\" water you have with you or do you drink the water you \"found\" in the maze?";
        
        String S3="You have chosen the Right Path. You hear a creepy sound. Do you \"walk\" back or do you \"Continue\"on your path?";
        
        String S4="You choose the left path. You continue on your journey when you see a big deep whole in the middle of the road! Do you \"jump\" over it or do you \"walk\" back?";
        
        String S5="You have chosen the right path. You are running when you see a huge spider. Do you \"attack\" it with a dagger or do you \"run\" away from it?";
            
        String S6="You drink your own limited water and it finishes. Do you \"take\" some of the water or do you \"keep\" walking?";
            
        String S7="You drink the water you found. Then you feel butterflies in your stomach. Do you \"continue\" your journey or do you drink the \"medicine\" in your bag pack?";
            
        String S8="You walk back and you see that your way back is blocked with a wall. So you continue on your journey. As you are walking you see a doorknob. Do you \"turn\" the knob or \"listen\" to what is in the room?";
        
        String S9="You continue on your journey and you find out that the sound you heard was the sound of cannibals eating one of their own members. They suddenly see you and come toward you. Your whole body is shaking and you don't know what you should do. They surround you, their leader steps in front of you and asks \"Do you want to join us\"? Do you say \"yes\" or \"no\"?";
            
        String S10="You back up and jump. Your hands reach the other side and you pull yourself up. You see a writing written in blood pointing to a lake and it says \"jump in\" do you \"do\" as the writing says or do you \"continue\"?";
            
        String S11="You decide to walk back, but after 20 minutes of not being able to go anywhere, you go back and see the whole again. After observing it you see two ladders going in different directions. Do you choose the right \"ladder\" which leads to a door or do you choose the loose \"left\" ladder going to the bottom of the whole?";
            
        String S12="You attack the spider with your dagger. You kill the spider. You get hungry right after and you eat the last of your food stock. Then you suddenly remember the apocalypse training that you had with your dad and ask yourself \"Should I \"take\" the spider meat or just \"leave\" it because it looks very disgusting?\"";
            
        String S13="You start running but the spider jums up and blocks your path, it makes you to fight it, so you take out your dagger but you are too late. It devours you but you take your dagger with you in its stomach. You have a choice. Do you \"cut\" its stomach and take the risk of breaking your legs because of its enormity, or do you \"wait\" fo the spider to fall asleep and try to climb out of its mouth?";
            
        String S14="You take some of the water and keep walking. After a while you feel thirsty again do you \"drink\" the water or do you \"keep\" going?";
            
        String S15="You keep walking but after 1 hour you feel dehydrated and dizzy. Do you\"ignore\" it and push through or do you \"lay\" down for a quick nap hoping you would get better when you wake up?";
        
        String S16="You continue on your journey but your stomach is still aching. Do you change your mind about having the \"medicine\" or do you \"endure\" the pain?";
            
        String S17="You take your medicine but it doesn't make you feel any better. Do you drink \"more\" of it or do you put it \"away\" on run to find a way out of this maze?";
            
        String S18="You open the door and find a person inside. He tells you he knows a way out do you \"trust\" him and go with him or do you \"decline\" his offer?";
            
        String S19="You place your ear on the rock but can't hear anything. Do you decide to \"open\" the door anyway or \"continue\" with your maze adventure?";
            
        String S20="You say yes because you have given up on finding a way out. After 3 days your group finds a new person trapped in the maze. As a ritual the group makes you kill the person and eat him first. Do you \"accept\" their ritual or do you \"run\" away from them because it is so crazy?";
        
        String S21="You say no, so they attack you to eat you as a pray. Do you stand and \"fight\" them or do you \"run\" away like a chicken?";
            
        String E1="You do as the writting says and you jump in. You see a straight path and you can see light in the end of it. You run for 15 minutes and you finally get out of the maze!";
            
        String E2="You continue on your journey bit you can't find the way out after searching for it for 4 years! You finally kill yourself with a dagger you find!";
            
        String E3="You choose the right ladder and you open the door it leads to. Suddenly six zombies jump on you and eat your brain!";
            
        String E4="You choose the left ladder and you reach a tunnel under the maze which leads you to the exit!";
            
        String E5="You take some of the spider meat and eat it. It turns out that all of the meat had a 20% composition of acid and you die instantly!";
        
        String E6="You ignore your hunger and you go searching for the exit. After 3 years, 6 months, and 12 days you finally find an exit!";
            
        String E7="You cut its stomach and you fall out but unfortunately you break your legs. You cant move and you stay where you are. After 3 days another spider finds you and eats you but this time you can't hold on to your dagger and you can't save yourself!";
            
        String E8="You wait until the spider falls asleep and you jump out of its mouth. It doesn't notice you and you escape. After 3 years, 6 months, and 12 days you finally find an exit!";

        String E9="You drink the water but it turns out it was poison.YOU DIE!";
            
        String E10="You keep going but eventually you feel dehydrated and drink it. It turns out it was poison.YOU DIE!";
            
        String E11="You ignore the feeling but after a while you pass out. You never wake up!";
            
        String E12="You lay down for a while a close your eyes. You never open them again!";
            
        String E13="You take the medicine. After you do, you take a look at the medicine box and the expiration date of the medicine was two weeks ago. You freak out and start running around to find the exit but you never succeed!";
            
        String E14="You don't take the medicine. Your stomachache starts worsening by each minute until you eventually die of food poisoning.";
            
        String E15="You drink more of the medicine but unfortunately you take too much. You overdose and die right away!";
            
        String E16="You keep running to find a way you but you can't find a way out. Your stomachache worsens until you die of food poisoning!";
            
        String E17="You trust the person and as he promises he shows you the way out and you are saved!";
            
        String E18="You decline his offer. The person gets angry and attacks you with his laser gun!";
        
        String E19="You open the door and you find a path that leads out of the maze. NICE JOB!";
        
        String E20="You continue without opening the door but after three days of not being able to find the way out, you try to find the doorknob again. After 2 months of searching you die of sarvation!";
        
        String E21="You accept their ritual and attack the person. He suddenly throws a rock and it hits your head and you die instantly!";
        
        String E22="You decline their ritual. They suddenly attack you because you have underminded their ritual. Because of their high number, they succeed and eat you!";
        
        String E23="They suddenly attack you because you have underminded their ritual. Because of their high number, they succeed and eat you!";
        
        String E24="You start running away but you reach a dead end. You are forced to defend yourself but because of their high number, they succeed and eat you!";
            
        System.out.println(Beginning);
        response = keyboard.next();
        System.out.println("");
        
        if(response.equals("right"))
        {
            System.out.println(S1);
            response = keyboard.next();
            System.out.println("");
            
            if(response.equals("left"))
             {
                System.out.println(S4);
                response = keyboard.next();
                System.out.println("");
                
                if(response.equals("jump"))
             {
                System.out.println(S10);
                response = keyboard.next();
                System.out.println("");
                    if(response.equals("do"))
             {
                System.out.println(E1);
                response = keyboard.next();
                System.out.println("");
             } // if
            else if(response.equals("continue"))
            {
                System.out.println(E2);
                response = keyboard.next();
                System.out.println("");
            } // else if
            else
            {
            System.out.println("Invalid input!");
            } // else
            } //if
            else if(response.equals("walk"))
            {
                System.out.println(S11);
                response = keyboard.next();
                System.out.println("");
                
                if(response.equals("ladder"))
             {
                System.out.println(E3);
                response = keyboard.next();
                System.out.println("");
             } // if
             else if(response.equals("left"))
             {
                System.out.println(E4);
                response = keyboard.next();
                System.out.println("");
             } // else if
             else
             {
              System.out.println("Invalid input!");
             } // else
            } // else if
            else
            {
              System.out.println("Invalid input!");
            } // else
            } // if
            else if(response.equals("right"))
            {
                System.out.println(S5);
                response = keyboard.next();
                System.out.println("");
                
                 if(response.equals("attack"))
             {
                System.out.println(S12);
                response = keyboard.next();
                System.out.println("");
                     
                     if(response.equals("take"))
             {
                System.out.println(E5);
                response = keyboard.next();
                System.out.println("");
            } // if
            else if(response.equals("leave"))
            {
                System.out.println(E6);
                response = keyboard.next();
                System.out.println("");
            } // else if
            else
            {
            System.out.println("Invalid input!");
            } // else
            } // if
            else if(response.equals("run"))
            {
                System.out.println(S13);
                response = keyboard.next();
                System.out.println("");
                
                if(response.equals("cut"))
             {
                System.out.println(E7);
                response = keyboard.next();
                System.out.println("");
            } // if
            else if(response.equals("wait"))
            {
                System.out.println(E8);
                response = keyboard.next();
                System.out.println("");
            } // else if
            else
            {
            System.out.println("Invalid input!");
            } // else
            } // else if
            else
            {
            System.out.println("Invalid input!");
            } // else
            }  //////////////////////////////////////////
            else
            {
            System.out.println("Invalid input!");
            }
        } // if
        else if(response.equals("middle"))
        {
            System.out.println(S2);
            response = keyboard.next();
            System.out.println("");
            
            if(response.equals("limited"))
             {
                System.out.println(S6);
                response = keyboard.next();
                System.out.println("");
                
                if(response.equals("take"))
             {
                System.out.println(S14);
                response = keyboard.next();
                System.out.println("");
                    
                    if(response.equals("drink"))
             {
                System.out.println(E9);
                response = keyboard.next();
                System.out.println("");
            }
            else if(response.equals("keep"))
            {
                System.out.println(E10);
                response = keyboard.next();
                System.out.println("");
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else if(response.equals("keep"))
            {
                System.out.println(S15);
                response = keyboard.next();
                System.out.println("");
                
                if(response.equals("ignore"))
             {
                System.out.println(E11);
                response = keyboard.next();
                System.out.println("");
            }
            else if(response.equals("lay"))
            {
                System.out.println(E12);
                response = keyboard.next();
                System.out.println("");
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else if(response.equals("found"))
            {
                System.out.println(S7);
                response = keyboard.next();
                System.out.println("");
                
                if(response.equals("continue"))
             {
                System.out.println(S16);
                response = keyboard.next();
                System.out.println("");
                    
                    if(response.equals("medicine"))
             {
                System.out.println(E13);
                response = keyboard.next();
                System.out.println("");
            }
            else if(response.equals("endure"))
            {
                System.out.println(E14);
                response = keyboard.next();
                System.out.println("");
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else if(response.equals("medicine"))
            {
                System.out.println(S17);
                response = keyboard.next();
                System.out.println("");
                
                if(response.equals("more"))
             {
                System.out.println(E15);
                response = keyboard.next();
                System.out.println("");
            }
                else if(response.equals("away"));
            {
                System.out.println(E16);
                response = keyboard.next();
                System.out.println("");
            }
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else
            {
            System.out.println("Invalid input!");
            }
        }  
        else if(response.equals("left"))
        {
            System.out.println(S3);
            response = keyboard.next();
            System.out.println("");
            
            if(response.equals("walk"))
             {
                System.out.println(S8);
                response = keyboard.next();
                System.out.println("");
                
               if(response.equals("turn"))
             {
                System.out.println(S18);
                response = keyboard.next();
                System.out.println("");
                   
                   if(response.equals("trust"))
             {
                System.out.println(E17);
                response = keyboard.next();
                System.out.println("");
            }
            else if(response.equals("decline"))
            {
                System.out.println(E18);
                response = keyboard.next();
                System.out.println("");
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else if(response.equals("listen"))
            {
                System.out.println(S19);
                response = keyboard.next();
                System.out.println("");
                
                if(response.equals("open"))
             {
                System.out.println(E19);
                response = keyboard.next();
                System.out.println("");
            }
            else if(response.equals("continue"))
            {
                System.out.println(E20);
                response = keyboard.next();
                System.out.println("");
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else if(response.equals("continue"))
            {
                System.out.println(S9);
                response = keyboard.next();
                System.out.println("");
                
                if(response.equals("yes"))
             {
                System.out.println(S20);
                response = keyboard.next();
                System.out.println("");
                    
                    if(response.equals("accept"))
             {
                System.out.println(E21);
                response = keyboard.next();
                System.out.println("");
            }
            else if(response.equals("run"))
            {
                System.out.println(E22);
                response = keyboard.next();
                System.out.println("");
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else if(response.equals("no"))
            {
                System.out.println(S21);
                response = keyboard.next();
                System.out.println("");
                
                if(response.equals("fight"))
             {
                System.out.println(E23);
                response = keyboard.next();
                System.out.println("");
            }
            else if(response.equals("run"))
            {
                System.out.println(E24);
                response = keyboard.next();
                System.out.println("");
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else
            {
            System.out.println("Invalid input!");
            }
            }
            else
            {
            System.out.println("Invalid input!");
            }
        }
        else
        {
            System.out.println("Invalid input!");
        }
    }
}



    

Picture of the output

assignmentP1