Advertisement
Guest User

#33 Choose Your Own Short Adventure!

a guest
Jul 24th, 2013
279
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 5.17 KB | None | 0 0
  1. import java.util.Scanner;
  2.  
  3. public class Adventure1
  4. {
  5.     public static void main(String[] args)
  6.     {
  7.         Scanner keyboard = new Scanner(System.in);
  8.        
  9.         String q1, q1_2, q1_3;
  10.        
  11.         System.out.println("WELCOME TO JASON'S TINY ADVENTURE! \n");
  12.        
  13.         System.out.println("You and your friends enter the \"Haunted House\" at the end of the street \nfrom a lost bet. When you enter you find what you would expect from a \nabandoned house just a bunch of scattered items and old furniture. \nYou explore the 1st floor to find nothing too interesting. \n \nDo you investigate upstairs or the basement? \n");
  14.         q1 = keyboard.next();
  15.         String Q1 = q1.toUpperCase();
  16.        
  17.         //UPSTAIRS
  18.         if (Q1.equals("UPSTAIRS"))
  19.         {
  20.             System.out.println("\nYou find that there are 2 rooms, the room on the right seems to be the \nmaster bedroom, and the room on the left seems to be the kids room.\n\nSo what is it right or left? \n");
  21.             q1_2 = keyboard.next();
  22.             String Q1_2 = q1_2.toUpperCase();
  23.             if (Q1_2.equals("LEFT"))
  24.             {
  25.                 System.out.println("\nIn the kids room you find a closet with a strange light coming out of it.\n\nDo you go open the closet(YES or NO)?\n");
  26.                 q1_3 = keyboard.next();
  27.                 String Q1_3 = q1_3.toUpperCase();
  28.                 if (Q1_3.equals("YES"))
  29.                 {
  30.                     System.out.println("\nWhen you open the closet you find a child hiding with a flash light \npointing towards his face. He jumps out and hugs you for saving him \nfrom the scary monsters. You are the town hero, you win!");
  31.                 }
  32.                 else if (Q1_3.equals("NO"))
  33.                 {
  34.                     System.out.println("\nYou run out of the house scared, and go back home. The next morning \nyou read the paper about a kid was found mutilated in the haunted house \ndown the street you feel guilty and realize that the light was probably the kid and whatever else is in that house killed him. \nYou lose...");
  35.                 }
  36.                 else
  37.                 {
  38.                     System.out.println("\nSorry I do not recognize that command.");
  39.                 }
  40.             }
  41.             else if (Q1_2.equals("RIGHT"))
  42.             {
  43.                 System.out.println("\nWhen you enter the master bedroom you see a very unusual seen the \nroom is not completely trashed it's like it was untouched by the world. \nThe only weird thing was one tear on the wallpaper, you pull away at \nthe wallpaper and reveal a bloody text saying \"GET OUT!\" \n \nDo you leave or investigate further(INVESTIGATE or LEAVE)?\n");
  44.                 q1_3 = keyboard.next();
  45.                 String Q1_3 = q1_3.toUpperCase();
  46.                 if (Q1_3.equals("INVESTIGATE"))
  47.                 {
  48.                     System.out.println("\nYou look further into the room only to find out why this house is so \nhaunted a ghost looks you in the eyes and the sudden feeling of \ndepression falls in and you pick up a rock and smash it into your head. \nYou lose...");
  49.                 }
  50.                 else if (Q1_3.equals("LEAVE"))
  51.                 {
  52.                     System.out.println("\nYou leave and avoid your death. You Win!");
  53.                 }
  54.                 else
  55.                 {
  56.                     System.out.println("\nSorry I do not recognize that command.");
  57.                 }
  58.             }
  59.             else
  60.             {
  61.                 System.out.println("\nSorry I do not recognize that command.");
  62.             }
  63.         //BASEMENT
  64.         }
  65.         else if (Q1.equals("BASEMENT"))
  66.         {
  67.             System.out.println("\nYou go into the basement and find \na very creepy environment with what looks like to be storage for whoever \nused to live here. You find a door that has a sign above saying \nsomething in russian so you don't undertand anything.\n\nDo you go inside(YES or NO)?\n");
  68.             q1_2 = keyboard.next();
  69.             String Q1_2 = q1_2.toUpperCase();
  70.             if (Q1_2.equals("YES"))
  71.             {
  72.                 System.out.println("\nWhen you enter the door you find a long tunnel, so long you can't \nsee the end, it is also very dark.\n\nDo you go down the tunnel(YES or NO)?\n");
  73.                 q1_3 = keyboard.next();
  74.                 String Q1_3 = q1_3.toUpperCase();
  75.                 if (Q1_3.equals("YES"))
  76.                 {
  77.                     System.out.println("\nYou continue down the tunnel only to find nothing so you turn around \nand go back to the door only to find that the door is gone it is now \njust a wall. You spend the rest of your life in this tunnel and die \nof starvation. You Lose.");
  78.                 }
  79.                 else if (Q1_3.equals("NO"))
  80.                 {
  81.                     System.out.println("\nYou leave the tunnel and the house unharmed. You Win!");
  82.                 }
  83.                 else
  84.                 {
  85.                     System.out.println("\nSorry, I did not recognize that command.");
  86.                 }
  87.             }
  88.             else if (Q1_2.equals("NO"));
  89.             {
  90.                 System.out.println("\nYou decide to not go into tunnel and turn around to leave and find that \nsomething or somebody has blocked up the stairwell will what looks \nlike all the furniture from upstairs.\n\nWill you attempt to remove them or accept your fate(REMOVE or DO NOTHING)?\n");
  91.                 q1_3 = keyboard.next();
  92.                 String Q1_3 = q1_3.toUpperCase();
  93.                 if (Q1_3.equals("REMOVE"))
  94.                 {
  95.                     System.out.println("\nYou remove all of the furniture but it takes you a whole day. You get \nout but what ever was in there still haunts you till this day.\nYou win..");
  96.                 }
  97.                 else if (Q1_3.equals("NOTHING"))
  98.                 {
  99.                     System.out.println("\nYou accept your fate and slowly die of starvation.. You Lose.");
  100.                 }
  101.                 else
  102.                 {
  103.                     System.out.println("\nSorry I did no recognize that command.");
  104.                 }
  105.             }
  106.         }
  107.         else
  108.         {
  109.             System.out.println("\nSorry I did no recognize that command.");
  110.         }
  111.     }
  112. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement