Guest User

Untitled

a guest
Jan 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.63 KB | None | 0 0
  1. commands = ['walk','look','flip','switch','fart','suicide','taunt', 'light']
  2. p = "> " #input prompt
  3.  
  4. wrong= "Do what now?"
  5.  
  6.  
  7.  
  8.  
  9. def start():
  10.     level =1
  11.     next = ""
  12.  
  13.     print " You are in a room that is pretty damn dark. If only you could see something"
  14.     while not next == "-quit":
  15.  
  16.         input= raw_input(p)
  17.         input2 = [input.lower() for input in input.split()
  18.         for i in range(len(commands)):
  19.             if input2 == commands[i]:
  20.                 run_command(commands[i])
  21.  
  22. def run_command(command):
  23.     if command.lower() == "fart":
  24.         print "you farted too hard and pooped. Nice!"
  25. start()
Add Comment
Please, Sign In to add comment