Assignemnt #45
Code
/// Name: Holden Ganch
/// Period: 7
/// Program Name: Fourty Fifth Program
/// File Name: Adventure.java
/// Date Finished: 11/5/2015
import java.util.Scanner;
class Adventure{
public static void main(String[] args) {
Scanner keyboard = new Scanner(System.in);
String a, s, d, f, g, h, j;
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println("");
System.out.println(" Welcome to the play house");
System.out.println("Let's have some fun");
System.out.println("You are in the play house there is an elevator and you hear a loud screech do you go (up or stay)");
System.out.print("> ");
a = keyboard.next();
System.out.println("");
if (a.equals("up"))
{
System.out.println("When you go in the stairs you notice a blinding light to the left but a growl, and to the right you hear your favorite 1direction song playing but its pitch black. do you go (left or right)");
System.out.print("> ");
s = keyboard.next();
System.out.println("");
if (s.equals("left"))
{
System.out.println("the light is a spotlight that a large dog accidently hit though he is very friendly, you see a box of cookies that isnt opened do you (open_it or leave_it)");
System.out.print("> ");
d = keyboard.next();
System.out.println("");
if ( d.equals("open_it"))
{
System.out.println("You eat the cookies and wake up from your dream!");
}
else if (d.equals("leave_it"))
{
System.out.println("you turn around and leave the play house because you are scared and go eat your own cookies at your house.");
}
}
else if (s.equals("right"))
{
System.out.println("you go in and shoot the music box with your gun scaring the bats, do you (enter ) to become batman or (stay) ");
System.out.print("> ");
j = keyboard.next();
System.out.println("");
if (j.equals("enter"))
{
System.out.println("You become batman and save your city making bank and running for president");
}
else if (j.equals("stay"))
{
System.out.println("You realize that you have no meaning and 'accidently' shoot yourself");
}
}
}
else if (a.equals("stay"))
{
System.out.println("you smartly dont go in the elevator as it breaks and crashes to the bottem floor. are you ( hungry or not ) ");
System.out.print("> ");
f = keyboard.next();
System.out.println("");
if (f.equals("hungry"))
{
System.out.println("you go to the kitchen and are emotionally tore, do you either eat (ice cream or smore) the clown.");
System.out.print("> ");
g = keyboard.next();
System.out.println("");
if (g.equals("smore"))
{
System.out.println("you eat the smore and and die of rat poison, haha nice job fatty. ");
}
else if (g.equals("ice cream"))
{
System.out.println("you eat the ice cream and then drop and and slip and fall on it breaking your neck");
}
}
else if (f.equals("not"))
{
System.out.println("you dont want to eat becasue you need to go to bathroom, do you go to the toilet down the hall or do you pop a squat? (toilet or squat?) ");
System.out.print("> ");
h = keyboard.next();
System.out.println("");
if (h.equals("toilet"))
{
System.out.println("you are a spolied boy and pay for it as a sewer gator eat your bum");
}
else if (h.equals("squat"))
{
System.out.println("you are a real man for this and get rewarded with 1,000,000$ for your bravery");
}
}
}
else
{
System.out.println("You missed out on all the fun, what a shame");
}
System.out.println("");
System.out.println("you regret your decision now and want to restart");
}
}
Picture of the output