Assignemnt #45 and Own Adventure
Code
///Name: Ben Borlgin
///period: 6
///Program Name: Own Adventure
///File Name: OwnAdventure.java
///Date Finished: NA
import java.util.Scanner;
public class OwnAdventure
{
public static void main( String[] args)
{
Scanner keyboard = new Scanner(System.in);
System.out.println("Welcome to the sppooooooky house :P");
System.out.println("All our dreams can come true, if we have the courage to pursue them - Walt Disney");
System.out.println(" ");
System.out.println("Mission: Find scooby-doo and get out as fast as possible.");
System.out.println(" ");
///R1
String Q1, Q2, Q3;
System.out.println("You walk in the door and there are 2 paths. Also a creepy lady in a chair.");
System.out.println("Do you want to go upstairs? Or into the basement?");
System.out.print(">");
Q1 = keyboard.next();
if ( Q1.equals("upstairs"))
{
///R2
System.out.println("Good job... Now watch out the lady in the chair has noticed you,");
System.out.println(" ");
System.out.println("You must make you decisions faster or she will catch you.");
System.out.println("You now have two choices head for the open door to the left");
System.out.println("or head to the broken window to the right?");
System.out.println("Go left.... or go right?");
System.out.print(" ");
Q2 = keyboard.next();
if ( Q2.equals("right"))
{
System.out.println("Good job... you just ditch you best friend.");
System.out.println("You don't even deserve the right to recieve this mission");
}
else if ( Q2.equals("left"))
{
///R4
System.out.println("You walk into the door and there is blood everywhere.");
System.out.println("You hear a cry but you can't tell where its coming from.");
System.out.println("Search the room? or check another door?");
System.out.println("Choose either 'search' or 'next'.");
System.out.print(">");
Q3 = keyboard.next();
///E1
if ( Q3.equals("search"))
{
System.out.println("You searched the room, but couldn't find anything.");
System.out.println("You turn towards the door and the lady standing at the door.");
System.out.println("GG... Prepare to enter in mini-game old lady chase.");
}
///E2
else if ( Q3.equals("next"))
{
System.out.println("You find your pal, Scooby-DOOOOOBY-DOOOO,");
System.out.println("You procede to find out that the old lady was super nice");
System.out.println("and made you supper.");
}
}
}
else if ( Q1.equals("basement"))
{
///R3
String Q4,Q5,Q6;
System.out.println("You now entered the sketchy basement.");
System.out.println("Good job... Now watch out the lady in the chair has noticed you,");
System.out.println("You must make you decisions faster or she will catch you.");
System.out.println(" ");
System.out.println("Ok. Now you can either head up a ladder or down though a trap door indside the basement.");
System.out.println("'up' for ladder, 'down' for basement.");
System.out.print(">");
Q4 = keyboard.next();
if (Q4.equals("up"))
{
System.out.println("Heading up eh?");
System.out.println(" ");
System.out.println("The ladder leads all the way to the top of the house.");
System.out.println("The temperature is 120 degrees giving you less then 5 minutes to live.");
System.out.println("The old lady is smart enough to not follow you though.");
System.out.println(" ");
System.out.println("Quickly now either head back down or search.");
System.out.println("Type either 'search' or 'down'.");
System.out.print(">");
Q5 = keyboard.next();
if (Q5.equals("search"))
{
System.out.println("You have made the right decision.");
System.out.println(" ");
System.out.println("Searching through the rubbish you hear a dry,");
System.out.println("hopeful, and friendly voice.");
System.out.println("You found your pal Scooby!!!");
System.out.println("Now have fun getting him out!");
}
else if (Q5.equals("down"))
{
System.out.println("You ran right back into the old creepy lady ");
System.out.println("and she kidnaps you");
System.out.println("Game over....");
}
}
else if (Q4.equals("down"));
{
System.out.println("Heading down eh?");
System.out.println(" ");
System.out.println("Heading further down into the depths of the haunted house");
System.out.println("Dropping the temperature 50 degrees");
System.out.println("Giving you around 5 minutes to live.");
System.out.println(" ");
System.out.println("The old lady is smart enough to not follow you though.");
System.out.println(" ");
System.out.println("Quickly now either head back down or search.");
System.out.println("Type either 'search' or 'down'.");
System.out.print(">");
Q6 = keyboard.next();
if (Q6.equals("search"))
{
System.out.println("You have made the right decision.");
System.out.println(" ");
System.out.println("Searching through the rubbish you hear a dry,");
System.out.println("hopeful, and friendly voice.");
System.out.println("You found your pal Scooby!!!");
System.out.println("Now have fun getting him out!");
}
else if (Q6.equals("down"))
{
System.out.println("You ran right back into the old creepy lady ");
System.out.println("and she kidnaps you");
System.out.println("Game over....");
}
}
}
}
}
Picture of the output