On Fri, Oct 3, 2008 at 9:19 AM, David <[EMAIL PROTECTED]> wrote: > > Okay, I'm resurrecting this project. > Where is this project code? <http://www.linuxcrazy.com> >
Right here. The content is going to eventually go through some drastic changes, but what's here should be good enough for testing. # Content # retrieve data for current room room = 1 if room == 1: desc = "Ahead of you, you see a chasm." ques = "Do you wish to try jumping over it? Y/N" destYes = 2 destNo = 3 elif room == 2: desc = "Ahead of you, you see a warty green ogre." ques = "Do you wish to eat it? Y/N" destYes = 4 destNo = 5 # etc for the rest of the rooms # Engine # ask current question and move to next room print desc ans = raw_input(ques).upper() # allow for lower case input if ans == "Y": room = destYes elif ans == "N": room = destNo elif ans == "north": room = destN elif ans == "south": room = destS elif ans == "east": room = destE elif ans == "west": room = destW elif ans == "Q": # give us a way out. Break else: print "I don't understand. Can you give a clearer answer?" It seems like good code, but for some reason, it's not letting me go into Room 2 (the ogre). I remember last time I tried this, the problem had something to do with redirecting back into the same room, but I don't remember exactly what that issue was.
_______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor