Assignemnt #41 Choose your own adventure
Code
///Name: JJ Deng
///Period: 11/19/15
///Program Name: Choose your own adventure
///File Name: Adventure.java
///Date Finished: 11/16/20
import java.util.Scanner;
public class Adventure
{
public static void main(String[] args)
{
Scanner keyboard = new Scanner(System.in);
String r1="", r2="", r3="",r4="", r5="", r6="", r7="";
System.out.println( "Welcome to JJ's Spoooooky house" );
System.out.println();
System.out.println( "YOU GON DIE SUCKA!!! JK U'IL PROBABLY LIVE IF UR SMART" );
System.out.println();
System.out.println( "You are in front of a creepy house! Would you like to go in ( yes or no ) " );
System.out.print( ">" );
r1 = keyboard.next();
System.out.println( "" );
if ( r1.equals("yes"))
{
System.out.println( "You walked in and you saw two different doors, make your choice (left, and right)" );
System.out.print( ">" );
r2 =keyboard.next();
System.out.println( "" );
if ( r2.equals("left"))
{
System.out.println( "You opened the door and you saw light so you kept on walking towards it, until you see bunch of trolls dancing around the fire ( run or dance )" );
System.out.print( ">" );
r4 =keyboard.next();
System.out.println( "" );
}
if ( r4.equals("run"))
{
System.out.println( "When you try to run away the trolls noticed you, chased you down and ate you , TROLOLOL");
}
else if ( r4.equals("hide"))
{
System.out.println( "You try to approach the trolls by start dancing randomly, they noticed you and ate you Trololol" );
}
}
else if ( r2.equals("right"))
{
System.out.println( "You opened the door and you see a old creepy staircase down to the basement, you kept on walking down and you realized its a way to paradise, in that paradise you fell in love with a girl but she said you can only see her once a year, and if agree to stay here you only have 10 years to live, would you stay or leave");
System.out.print( ">" );
r5 =keyboard.next();
System.out.println( "" );
}
if ( r5.equals("stay"))
{
System.out.println( "The girl was actually Jesus's daughter they were both testing you the whole time, thus you lived happily ever after! GG! U WIN" );
}
else if ( r5.equals("leave"))
{
System.out.println( "You choose to leave, and left the girl heartbroken his daddy Jesus came and messed you up and send you to hell, LOL u f**ked brah " );
}
else if( r1.equals("no"))
{
System.out.println( "You turned around and ran for 20 mins striaght, and then you realized something or someone was following you the whole time, and you saw a strange black car driving by, and you choose to ( hitchhike or keep on running" );
System.out.print( ">" );
r3 =keyboard.next();
System.out.println( "" );
}
if ( r3.equals("hitchhike"))
{
System.out.println( "Your put up your thumb and the car stopped, you look inside the car window, you realized the driver was a Ghostly Figure, he tells you to get in ( yes or no )" );
System.out.print( ">" );
r6 =keyboard.next();
}
if ( r6.equals("yes"))
{
System.out.println( " He was actually a secret messenger from god, you told him what happened and you were saved LOL " );
}
else if (r6.equals("no"))
{
System.out.println( " He was a secret messenger from god, because you didn't want to go in he needs to kill you to keep secret, so he shot you with a Ghost gun and you died LOL " );
}
else if ( r3.equals("keep on running"))
{
System.out.println( "Then the person following you catched up, he told you that he was from the government and you are gonna be save if you go with him (yes or no " );
System.out.print( ">" );
r7 =keyboard.next();
System.out.println( "" );
}
if ( r7.equals("no"))
{
System.out.println( "He was actually a evil spirit from the castle, he captured you back to the castle and sucked all your blood, you died af brah!" );
}
else if ( r7.equals("yes"))
{
System.out.println( "He was actually a evil spirit from the castle, he captured you back to the castle and sucked all your blood, you died af brah!" );
}
}
}
Picture of the output