Assignemnt #45 and Choose Your Own Adventure

Code

      ///Name: Dakota Donahue
      ///Period: 5
      ///Project Name: Choose Your Own Adventure
      ///File Name: OwnAdventure
      ///Date: 11/4/2015
      
      import java.util.Scanner;

      public class OwnAdventure
      {
          public static void main ( String[] args )
          {
              
              Scanner keyboard = new Scanner(System.in);
              
              String q1, q2, q3, q4;
              boolean r1, r2, r3, r4, r5, r6, r7, e1, e2, e3, e4, e5, e6, e7, e8;
              
              System.out.println( " \n " );
              System.out.println( " You wake up in a cobblestone alley, drenched in rain, unaware of how you got there. You begin to move down the alley hoping to find an indication of where you are. Do you 'continue'?\n " );
              q1 = keyboard.next();
              
              r1 = q1.equals("continue");
              
              if ( r1 == true )
              {
                  System.out.println( "\n You round the corner of the alley and look up and down the street. The streets are also paved in cobblestone and completely empty. To your right you can see the keep of a castle and to your left you see an inn with light flickering from inside. Do you turn 'right' and approach the castle or turn 'left' and approach the inn?\n " );
                  q2 = keyboard.next();
                  
                  r2 = q2.equals("right");
                  r3 = q2.equals("left");
                  
                  if ( r2 == true )
                  {
                      System.out.println( "\n You walk to the castle and find that it lacks a front gate. You decide to walk into the dark castle with extiguished torch sconces lining the sides of the halls. After walking for some time to down the main hall of the castle you come upon a large court. In the center of the court is a stone block with a single beam of sunishine hitting it from above along with gradual drops of rain through a skylight at the top of the cavernous room. You approach the block and realise that it can be opened from above. Curious as to its contents, you consider whether or not you wish to open it. Do you 'open' the stone block or 'return' to the way you came?\n " );
                      q3 = keyboard.next();
                      
                      r4 = q3.equals("open");
                      r5 = q3.equals("return");    
                      
                      if ( r4 == true )
                      {
                          System.out.println( "\n You slide the cover off of the top of the stone block and it lands to the side with an echoing crash. Peering in you can see that the block is the entryways to a descending set of steps. Each step is gradually darker and you feel a great sense of fear but you have an overwhelming feeling that at the bottom of the steps you will find something that you deeply desire. Do you 'descend' into the dark or 'return' from the way you came?\n " );
                          q4 = keyboard.next();
                          
                          e1 = q4.equals("descend");
                          e2 = q4.equals("return");
                          
                          if ( e1 == true )
                          {
                              System.out.println( "\n As you descend into the dark each step you take grows gradually louder until each generates a deafening vibration which reverberates throughout the dark staircase. Dark circles fly across the surface of your eye and you feel for the first time since waking up as though you are not alone. You attempt to return the top of the steps but the stairs extend infinitely in front of you and the cover of the stone block closes you off from the surface. You are in a complete darkness of your conciousness gradually diffuses into a deep sleep. After an unknown amount of time in unconciousness you wake up in a cobblestone alley, drenched in rain, unaware of how you got there. " );
                          }
                          else if ( e2 == true )
                          {
                              System.out.println( "\n You turn away from the stone block and directly behind you is on opaque cloud of air about the size of a man. It eminates an oppressing thickness through the air and you feel as though everything on the side of you which faces it has become incomprehensibly cold. You reach out to touch the gaseous figure and it swiftly engulfs you. You are unable to escape from inside of it and feel as though every bone within your body is being pushed inward to the point of implosion. You lose conciousness and the pain subsides into an embracing warmth. You wake up in a golden field of wheat drenched in sunlight, unaware of how you got there. " );
                          }
                          else
                          {
                              System.out.println( "\n This is not an option, please try again from the start.\n " );
                          }
                      }
                      else if ( r5 == true )
                      {
                          System.out.println( "\n You turn back and begin walking again down the hallway, deeper into the castle. You see a warm green light shining from beyond a gaping archway at the end of the main hall. You approach the archway and peer through to see a tree with its roots penetrating the floor through cracks between the stone tiles. A bright ray of sunlight shines through a hole in the wall of the keep, luminating several branches of the tree. Some quality of the warped twisting trunk of the tree and its green, moss-laiden bark indicates to you that the tree is far older than anything else you've ever seen. Off of one of the branches of the tree hangs a bright red fruit. You realise that you haven't eaten in some time and consider picking the fruit. Do you 'pick' the fruit or 'leave' the castle through the main hall?\n " );
                          q4 = keyboard.next();
                          
                          e3 = q4.equals("pick");
                          e4 = q4.equals("leave");
                          
                          if ( e3 == true )
                          {
                              System.out.println( "\n You pick the fruit and after shortly observing it, it appears to be edible. You bring it to your mouth and take a bite, then clumsily drop the fruit to the ground. You bend over the pick it up and in front of you falls a slab of bright red flesh. You slowly reach for your face and find not skin but the moist surface of your facial muscles and skull. Without being capable of another thought, your body boils from within disentigrates under you, and your eyes roll into the back of your head. Everything blinks out into a black silence. " ); 
                          }
                          else if ( r4 == true )
                          {
                              System.out.println( "\n You turn back and walk to the front of the castle. You pull the lever adjacent to the door and it opens in front of you. You step out of the front gate and look back for a moment as the door closes behind you. You look forward once again and see not the street as you had expected, but a dark cobblestone alleyway. You blink and each time you close your eyes you are less capable of opening them up once again. You fall into a deep sleep. You wake up in the a cobblestone alley, drenched in rain. " );
                          }
                          else
                          {
                              System.out.println( "\n This is not an option, please try again from the start.\n " );
                          }
                      }
                      else
                      {
                      }
                  }
                  else if ( r3 == true )
                  {
                      System.out.println( "\n You walk down the street towards the thatched roof inn, and attempt to look inside through one of the paneled front windows. The windows are opaque and coated from the inside with a layer of ash making them impossible to see through. You decide to go inside the inn and promptly swing open the rotted wooden front door. You consider whether or not you want to proceed and check inside the 'inn,' or continue further down the 'street' in the direction you'd been going before.\n " );
                      q3 = keyboard.next();
                      
                      r6 = q3.equals("inn");
                      r7 = q3.equals("street");
                      
                      if ( r6 == true )
                      {
                          System.out.println( "\n You swing open the rotting carcass of a door that adorns the front of the inn. It creaks with a load squeal from its orange rusted hinges. The entry area is a wide lobby decorated incongruously with French neo-classical furnishings and works of fine art. The walls are blidingly white, and the room smells sterile. The dilapidated front door appears as though it is a portal to the filthy archaic world which you just came from. The room is furnished by a rose colored silk bed with a brass frame, and a shining metallic table covered on top by a platter and what seems to be a bowl of soup. Despite your recent unconciousness, you feel very tired. Do you 'sleep' in the bed or 'eat' the meal on the table?\n ");
                          q4 = keyboard.next();
                          
                          e5 = q4.equals("sleep");
                          e6 = q4.equals("eat");
                          
                          if ( e5 == true )
                          {
                              System.out.println( "\n You take a seat at the end of the bed and look down at your shoes as you attempt to pull them off with your feet. You glance back up and see a figure now sitting at the table directly adjacent to you, with their back facing towards you. You stand and inch towards the gray haired (yet well groomed) figure and at the next instant you are sitting in the table in the same place as the figure just was. You look around to find the figure which you'd just seen at the table and now see a dying shriveled man sitting in the bed staring half-conciously toward the foot of the bed. Your hands are shriveled now and the fork which you are holding shakes violently. You slowly stand once more and at the next instant you are laying in the bed. You feel a sensation beyond weakness, as though you are now at the border between life and death. You look downward toward the foot of the bed. The door which you came through is now covered in moss and other vegitation. Its planks are now entirely rotted and one of its hinges has detached itself. Your feel unable to keep your eyes open any longer as you are clutched in the grip of death. As you fade out and your head falls to your side the last thing you see is the dilapidated door slowly swing open. Everything ends. ");
                          }
                          else if ( e6 == true )
                          {
                              System.out.println( "\n You take a seat at the table and look down at your shoes as you attempt to pull them off with your feet. You glance back up and see a figure now lying in the bed directly adjacent to you, with their back facing towards you. You stand and inch towards the gray haired (yet well groomed) figure in the bed and at the next instant you are lying in the bed in the same place as the figure just was. You look around to find the figure which you'd just seen in the bed and now see a dying shriveled man sitting stooped over on the ground staring half-conciously towards it. Your hands are shriveled now and the blanket between your fingers slips out of your grip. You slowly stand once more and at the next instant you sitting on the floor where the man was. You feel a sensation beyond weakness, as though you are now at the border between life and death. You gingerly look upward toward the front of the room. The door which you came through is now covered in moss and other vegitation. Its planks are now entirely rotted and one of its hinges has detached itself. Your feel unable to keep your eyes open any longer as you are clutched in the grip of death. As you fade out and your head falls to your side the last thing you see is the dilapidated door slowly swing open. Everything ends. ");
                          }
                          else
                          {
                              System.out.println( "\n This is not an option, please try again from the start.\n " );
                          }
                      }
                      else if ( r7 == true )
                      {
                          System.out.println("\n As you continue down the rainy cobblestone road, it becomes thinner and thinner, covered on each side by dark and inordinary looking buildings, all of which seem to be abandoned. After walking for sometime along the dark, curving road you reach its end. At the end of the street is a flat stone wall with two shining mahogany doors adjacent to one another. You look back up the road and see the stone brick houses converging with a load rumble. You now stand in an enclosed courtyard with houses on all sides, and a set of doors in front of you. Your only option is to go through either of the identical doors. Do you choose to pass through the 'left' door, or the 'right' door?\n");
                          q4 = keyboard.next();
                          
                          e7 = q4.equals("left");
                          e8 = q4.equals("right");
                          
                          if ( e7 == true )
                          {
                              System.out.println("\n You slowly approach the left door and lay your hand on the golden door handle. You breath deeply as you pull open the door with one swift thrust. The doorway is dark, but you proceed through it. Immediately you grow numb and feel a great physcial burden afflict your entire body. You feel extreme nausea and regurgitate violently. You feel your insides growing empty as you continue puking for an indechipherable amount of time. A glint of light shine through the doorway to where your are kneeled down puking on all fours. The light reveals a pile of your internal organs sitting before you. You lose conciousness and your face is planted into your still warm organs on the floor. You wake up in a cobblestone alley, drenched in rain, unaware of how you got there. ");
                          }
                          else if ( e8 == true )
                          {
                              System.out.println("\n You slowly approach the right door and lay your hand on the golden door handle. You breath deeply as you pull open the door with one swift thrust. The doorway is dark, but you proceed through it. Immediately you grow numb and feel a great physcial burden afflict your entire body. You feel extreme nausea and regurgitate violently. You feel your insides growing empty as you continue puking for an indechipherable amount of time. A glint of light shine through the doorway to where your are kneeled down puking on all fours. The light reveals a pile of your internal organs sitting before you. You lose conciousness and your face is planted into your still warm organs on the floor. You wake up in a cobblestone alley, drenched in rain, unaware of how you got there. ");
                          }
                          else
                          {
                              System.out.println( " This is not an option, please try again from the start.\n " );
                          }
                      }
                      else
                      {
                          System.out.println( " This is not an option, please try again from the start.\n " );
                      }
              
                  }
                  else
                  {
                      System.out.println( " Continuing is your only option, try again. " );
                  }
              }
          }
      }
            
    

        
  
    
ALettertoYourself