title: Text game - Game Loop
body: <pre><code>print "Welcome to the game. In the game you can 'look around' and 'examine things'."
  print "There is also some hidden actions."
  print "You wake up."
  
  input = raw_input("&gt; ")
  
  haveKey = False
  applesExist = True
  
  
  if input == "look around":
      print "You are in a dusty cell. There is a barrel in the corner of the room, an unmade bed,"
      print "a cabinet and chest. There is also a cell door."
  elif haveKey == False and input == "open door":
      print "The door is locked."
  elif haveKey == True and input == "open door":
      print "You open the door, walk out and immediately gets shot with an arrow. You won, kinda."
  elif input == "examine barrel":
       print "There is apples in the barrel."
  elif applesExist == True and input == "eat apple":
      print "Mmmmh, that was yummy! But now there are no apples left..."
      applesExist = False
  elif applesExist == False and input == "eat apple":
      print "sury, u et al aples befur!!1111"
  elif input == "examine bed":
      print "The bed is unmade, and has very dusty sheets. This place really needs a maid."
  elif input == "sleep on bed":
       print "You lie down and try to sleep, but you can't because of all the bugs crawling on you."
  elif input == "examine chest":
       print "There is a key in the chest."
  elif input == "take key":
      haveKey = True
      print "You take the key."
  elif input == "examine cabinet":
       print "The cabinet is made of dark oak wood. There is a endless cup of tea in it."
  elif input == "drink tea":
      print "You put some tea in your mouth, but immediately spit it out."
      print "It seems it has been here for quite some time."
  else:
      print "Huh, what did you say? Didn't catch that."
  </code></pre>
  
  <p>Um, hi. I need help. As you can see this is a very basic text game that
  lets the player interact with the environment. I plan to expand on the
  interacting thing and with that I need no help. But with the game loop I do. You probably realize, but for those that don't, every time I write a command the program closes. I've been told that I need a game loop to do this, but I have no idea how. </p>
  
  <p>Something I need to tell you, compared to you, I'm kinda retarded. I'm no programming genius, I just simply enjoy programming. So please, just say <em>how</em>, not <em>why</em>. I'll figure that out myself, since I have all the time in the world. And if I ever need to know <em>why</em>, then I'll ask you again! =D</p>