def Kuvaus(db): try: location = oma_funktiot.room_desc(db) desc = oma_funktiot.location(location) syote2.configure(text=str(desc)) return desc # Entry.insert(syote2, desc) except ValueError: virhe = "Et antanut pelkkiä lukuja!" return virhe
sys.stdout.write(char) sys.stdout.flush() time.sleep(0.04) time.sleep(2) input("\nPRESS ENTER TO START") cursor = db.cursor() cursor.execute("select * from plot") plot = cursor.fetchone() show_room_desc = 1 # pelin päälooppi while plot != (1, 1, 1, 1, 0) and plot != (1, 1, 1, 1, 1): if show_room_desc == 1: location = oma_funktiot.room_desc(db) print(oma_funktiot.location(location)) show_room_desc = 0 print(oma_funktiot.people(db)) first_input = input("\nWhat do you want to do?\n") if first_input != "quit": player_input(first_input) else: cursor.execute("update plot set state1=1,state2=1,state3=1,state4=1,state5=1") print("Thanks for playing Mystery Mansion!") cursor.execute("select * from plot") plot = cursor.fetchone() if plot == (1, 1, 1, 0, 0):