i have written a simple text game and i would like people to comment on my style and comment on things that i could improve on.
#=============================#
# Copyright Tom Tetlaw (c) 2009 #
#=============================#
import random
items = ["pot plant","painting","vase","lampshade","shoe"]
keyLocation = random.randrange(1, 5)
print "You went to bed lastnight felling tired and dizzy."
print "But the next morning, you wake up in a strange room, "
print "definitley not yours, there are some things in the room: "
for entry in items:
print repr((1 + items.index(entry))) + ") " + entry
print "You notice that the door is locked, so you should"
print " probably find a key."
while True:
choice = input("Where do you want to look: ")
if choice == keyLocation:
print "You open the door and light floods the room"
break
else:
print "You did'nt find the key in the " + items[choice -1]
print "\nThankyou for using text adventure.py!"