Code:
from random import randint class firstRoom(): def __init__(self): print "Welcome to the start of the game. Good luck finishing it." print "There is a keypad on the door. You have to get all 3 digits correct, or the door will never open again." return 'break_out' def break_out(self): # Until everythin is working only one number combination = "%d" % (randint(1,3)) guesses = 0 guess = raw_input("[KEYPAD]>") while guess != combination and guesses < 10: print "INCORRECT, TRY AGAIN" guesses += 1 return 'break_out' if guess == combination: print "welldone"
I do not get any errors, it just doesn't do anything.
This is my first time working with classes by the way.
Comment