Assignment 77 and Adventure
Code
///Matthew Hughs
///Period 5
///Adventure
///Adventure.java
///2/23/2016
import java.util.Scanner;
public class Adventure
{
public static void main( String[] args )
{
Scanner keyboard = new Scanner(System.in);
int nextroom = 1;
String choice = "";
while ( nextroom != 0 )
{
if ( nextroom == 1 )
{
System.out.println( "You have entered the webpage Twitch.tv, do you click on \"HS\" or do you click \"LOL\" ?. ");
System.out.print( " > " );
choice = keyboard.nextLine();
if ( choice.equals("HS") )
nextroom = 2;
else if ( choice.equals("LOL") )
nextroom = 3;
else
System.out.println( " Get Memed" );
}
if ( nextroom == 2 )
{
System.out.println( "You enter the Hearthstone page and you can choose \"Forsen\"." );
System.out.println( "You could also choose to click on the Meme Lord \"Reynad\" or you could go back to the twitch \"lobby\". ");
System.out.print( " > " );
choice = keyboard.nextLine();
if ( choice.equals("lobby") )
nextroom = 1;
else if ( choice.equals("Forsen"))
nextroom = 5;
else if ( choice.equals("Reynad"))
nextroom = 6;
else
System.out.println( choice + " wasn't an option. Try again." );
}
if ( nextroom == 3 )
{
System.out.println( "You enter the League twitch stream selection stream and have many choices." );
System.out.println( "Do you choose \"Sneaky\" or \"Dyrus\"? " );
choice = keyboard.nextLine();
System.out.print( " > " );
if ( choice.equals("Dyrus") )
nextroom = 1;
else if ( choice.equals("Sneaky") )
nextroom = 4;
else
System.out.println( choice + " wasn't an option. Try again." );
}
if ( nextroom == 4 )
{
System.out.println( "You get to sneaky's channel and die of cancer!" );
System.out.println();
nextroom = 0;
}
if ( nextroom == 5)
{
System.out.println("You enter Forsen's channel and see that chat.");
System.out.println("He is having a competition with Lyric for to Kappa spam.");
System.out.println("You quickly begin to spam kappa in Forsen's chat and you will the Kappa off!");
nextroom = 0;
}
if ( nextroom == 6)
{
System.out.println("You enter Reynad's channel and enjoy his memes.");
System.out.println("You fall asleep and go back to the beginning");
nextroom = 1;
}
}
System.out.println("GAME OVER");
}
}
Picture of the output