public class ScavengerHunt2
{
    public static void main (String args[])
    {
	new ScavengerHunt2 ();
    }


    public ScavengerHunt2 ()
    {
	System.out.println ("Welcome to the Scavenger Hunt!");
	char c = IO.inputChar ("Press <enter> to begin your next task in the RPG.");
	System.out.println ("");
	Entrance ();
    }


    public void Entrance ()
    {
	System.out.println ("You have arrived at Col. Mustard's mansion. As Mr. Body told you in ");
	System.out.println ("the last task, your job here is simple: FIND THE KEY TO THE SAFE. ");
	System.out.println ("Mr. Body told you that he was certain that Col. Mustard had left the ");
	System.out.println ("key somewhere on the main floor of his mansion. ");
	System.out.println ("");
	char c = IO.inputChar ("Press <enter> to enter Col. Mustard's mansion.");
	System.out.println ("");
	//Move to Foyer
	Foyer ();
    }


    public void Foyer ()
    {
	System.out.println ("You enter the front foyer. The marble floor is very elegant.");
	System.out.println ("The walls have some nice paintings on them. However, after looking");
	System.out.println ("around, you can't find a key anywhere.");
	System.out.println ("");
	System.out.println ("From the FOYER, you can go to");
	System.out.println ("(a) A Closet");
	System.out.println ("(b) The Library");
	System.out.println ("(c) The Main Hallway");
	System.out.println ("");
	char n = IO.inputChar ("Where would you like to go next? (a/b/c) ");
	System.out.println ("");
	if (n == 'a')
	    Closet ();
	else if (n == 'b')
	    Library ();
	else
	    Hallway ();
    }


    public void Closet ()
    {
	System.out.println ("You peek into the closet. It is giant and there are a ton of");
	System.out.println ("coats inside. You look in all of the pockets, and even open");
	System.out.println ("the umbrellas, but you can't find the key. Rats.");
	System.out.println ("");
	System.out.println ("From the CLOSET, you can go back to");
	System.out.println ("(a) The Front Foyer");
	System.out.println ("");
	char n = IO.inputChar ("Where would you like to go next? (a) ");
	System.out.println ("");
	Foyer ();
    }


    public void Library ()
    {

	System.out.println ("You have entered the library. All four walls are covered");
	System.out.println ("in bookcases. There must be a thousand books in here.");
	System.out.println ("You glance at the table and the chairs, but don't see the key.");
	System.out.println ("");
	System.out.println ("From the LIBRARY, you can go to");
	System.out.println ("(a) The Front Foyer");
	System.out.println ("(b) The Main Hallway");
	System.out.println ("");
	char n = IO.inputChar ("Where would you like to go next? (a/b/c) ");
	System.out.println ("");
	if (n == 'a')
	    Foyer ();
	else
	    Hallway ();
    }


    public void Hallway ()
    {
	System.out.println ("The main hallway sure has a lot of doors. You look inside");
	System.out.println ("the plant pot while you are here, but don't see the key.");
	System.out.println ("Darn, you'd better keep looking.");
	System.out.println ("");
	System.out.println ("From the HALLWAY, you can go to");
	System.out.println ("(a) The Front Foyer");
	System.out.println ("(b) Library");
	System.out.println ("(c) The Kitchen");
	System.out.println ("(d) The Music Room");
	System.out.println ("(e) The Living Room");
	System.out.println ("");
	char n = IO.inputChar ("Where would you like to go next? (a/b/c/d/e) ");
	System.out.println ("");
	System.out.println ("");
	if (n == 'a')
	    Foyer ();
	else if (n == 'b')
	    Library ();
	else if (n == 'c')
	    Kitchen ();
	else if (n == 'd')
	    MusicRoom ();
	else
	    LivingRoom ();
    }


    public void Conservatory ()
    {
	System.out.println ("The conservatory has many plants. You look in all of the pots, ");
	System.out.println ("but you don't see a key.");
	System.out.println ("The bonsai trees are especially nice. ");
	System.out.println ("There doesn't seem to be a key anywhere in the conservatory.");
	System.out.println ("");
	System.out.println ("From the CONSERVATORY, you can go back to");
	System.out.println ("(a) The Living Room");
	System.out.println ("");
	char n = IO.inputChar ("Where would you like to go next? (a) ");
	System.out.println ("");
	LivingRoom ();
    }


    public void Kitchen ()
    {
	System.out.println ("You look around the kitchen and see a pie on the counter. It");
	System.out.println ("looks delicious. You decide to cut it open to have a piece.");
	System.out.println ("You walk over to a drawer to look for a knife. ");
	System.out.println ("");
	char c = IO.inputChar ("Press <enter> to see what is inside.");
	System.out.println ("");
	System.out.println ("You found the key!");
	System.out.println ("");
	System.out.println ("Great work! Mr. Body will be pleased.");
	System.out.println ("");
	System.out.println ("Would you like to:");
	System.out.println ("(a) Play the scavenger hunt again");
	System.out.println ("(b) Exit");
	System.out.println ("");
	char n = IO.inputChar ("What would you like to do next? (a/b) ");
	System.out.println ("");
	if (n == 'a')
	    Entrance ();
	else
	    System.out.println ("Good bye!");


    }


    public void MusicRoom ()
    {
	System.out.println ("The Music Room has tons of instruments. You look inside");
	System.out.println ("the piano, the tuba, the trumpet and the harp. The drums");
	System.out.println ("don't seem to have the key near them either. You take");
	System.out.println ("a look through the music on the stands, no key anywhere.");
	System.out.println ("                               ");
	System.out.println ("From the Music Room, you can go to");
	System.out.println ("(a) The Main Hallway");
	System.out.println ("(b) The Kitchen");
	System.out.println ("(c) The Living Room");
	System.out.println ("");
	char n = IO.inputChar ("Where would you like to go next? (a/b/c) ");
	System.out.println ("");
	if (n == 'a')
	    Hallway ();
	else if (n == 'b')
	    Kitchen ();
	else
	    LivingRoom ();
    }


    public void LivingRoom ()
    {
	System.out.println ("The Living Room has a lot of very nice chairs and");
	System.out.println ("a giant sofa. There is a coffee table too.");
	System.out.println ("You pull off all of the sofa cushions and look all");
	System.out.println ("over the chairs, but you can't find the key in this");
	System.out.println ("room either.");
	System.out.println ("");
	System.out.println ("From the LIVING ROOM, you can go to");
	System.out.println ("(a) The Main Hallway");
	System.out.println ("(b) The Music Room");
	System.out.println ("(c) The Conservatory");
	System.out.println ("");
	char n = IO.inputChar ("Where would you like to go next? (a/b/c) ");
	if (n == 'a')
	    Hallway ();
	else if (n == 'b')
	    MusicRoom ();
	else
	    Conservatory ();
    }
}
