title: Working thru simple Java "Choose your own adventure" text game
body: <p>I am new to Java and coding in general. I have started working thru <a href="http://programmingbydoing.com/" rel="nofollow">these tutorials</a> with great success, until I got to <a href="http://programmingbydoing.com/a/choose-your-own-short-adventure.html" rel="nofollow">this one</a>. I know in my code I have not entered the option of going "upstairs" yet, because I wanted to make sure the "kitchen" option worked correctly first.</p>
  
  <p>The code compiles fine, however when I run it in a cmd line, I am able to choose the first option of going into the "kitchen" but when I choose to view the "pantry" it takes 2 cmd lines with "pantry" to execute actually looking into it. </p>
  
  <p>Also, if I choose the option to "run away" after looking in the "pantry", it does not println the text with the "run away" option.</p>
  
  <p>Sorry if there are easier ways to do this, however I have not learned them yet.</p>
  
  <p>Thanks for any help!</p>
  
  <pre><code>import java.util.Scanner;
  
  public class Adventure1
  {
  public static void main( String[] args ){
      Scanner keyboard = new Scanner(System.in);
  
  String Go, Look, Pantry, Eat;
  
  System.out.println( " WELCOME TO MY TINY ADVENTURE");
  System.out.println("  ");
  System.out.println( " You are in a creepy house! Would you like to go 'upstairs' or into the 'kitchen'? ");
  System.out.print( "&gt; ");
  Go = keyboard.next();
  
  if (Go.equalsIgnoreCase("kitchen"))
  {System.out.println("There is a long countertop with dirty dishes everywhere. Off to one side there is, as you'd expect, a refrigerator. You may open the 'refrigerator' or look in the 'pantry'. ");}
  System.out.print("&gt;  ");
  Look = keyboard.next();
  
  
      if (Look.equalsIgnoreCase( "refrigerator" ))
  {System.out.println("Inside the refrigerator you see food and stuff. It looks pretty nasty. Would you like to eat some of the food, 'Yes' or 'No'?");}
  System.out.print("&gt;  ");
  Eat = keyboard.next();
  
          if (Eat.equalsIgnoreCase("Yes"))
      {System.out.println("  ");
      System.out.println("You live!");}
  
          else if (Eat.equalsIgnoreCase("No"))
      {System.out.println("  ");
      System.out.println("You die of starvation!");}
  
  
  
  else if (Look.equalsIgnoreCase( "pantry" ))
  {System.out.println("There is a killer inside. Do you want to 'fight' them, or 'run away'?");}
  System.out.print("&gt;  ");
  Pantry = keyboard.next();
  
          if (Pantry.equalsIgnoreCase("fight"))
      {System.out.println("  ");
      System.out.println("You're weak and die");}
  
          else if(Pantry.equalsIgnoreCase("run away"))
      {System.out.println("  ");
      System.out.println("You died because your too slow &amp; can't run");}
  
  }
  
      }
  </code></pre>