Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- x = 0
- y = 0
- quitCommand = 0
- print "Welcome to the World of Textcraft!"
- print "----------------------------------"
- print ""
- while quitCommand != int(5):
- print "You are currently at (" + str(x) + ", " + str(y) + ")"
- print "Enter a command (1 = North, 2 = East, 3 = South, 4 = West, 5 = Exit):"
- if int(raw_input()) == 1:
- print "Moving north"
- y = y + 1
- elif int(raw_input()) == 2:
- print "Moving east"
- x = x + 1
- elif int(raw_input()) == 3:
- print "Moving south"
- y = y - 1
- elif int(raw_input()) == 4:
- print "Moving west"
- x = x - 1
- elif int(raw_input()) == 5:
- print "Dost thou leave so soon? Fare thee well!"
- quitCommand = 5
- else:
- print "I find your lack of reading comprehension skills disturbing."
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement