From a295c6605bbad888bbc4e311ed01d618bf265c48 Mon Sep 17 00:00:00 2001 From: log Date: Tue, 24 Jan 2023 15:53:27 +0100 Subject: [PATCH] States graduation game --- states.py | 64 +++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 states.py diff --git a/states.py b/states.py new file mode 100644 index 0000000..45106e8 --- /dev/null +++ b/states.py @@ -0,0 +1,64 @@ +currentRoom = "aquarium" +start = True +graduation = False +study = False + +while True: + if (start == True): + print("Graduation: The Game") + start = False + + if (graduation == True): + print("You Win!") + exit() + + i = input() + +# Choices in the aquarium + if currentRoom == "aquarium": + if i in ["look","see","view","explore"]: + print("Oh I'm in an aquarium cool") + + elif i in ["exit","walk","run","door","leave"]: + print("You use the door to exit the aquarium") + currentRoom = "neutralzone" + + elif i in ["learn","study","read", "pain", "frustration", "fun"]: + print("You have studied really hard. Noice") + study = True + +# Choices in the neutral zone + elif currentRoom == "neutralzone": + if i in ["look","see","view","explore"]: + print("Oh the BA students have a presentation. annoying.") + + elif i in ["exit","walk","run","door","leave"]: + print("You use the door to exit the neutralzone") + i = input("which door? (1 or 2)") + if i == "1": + print("You use the door to the aquarium") + currentRoom = "aquarium" + elif i == "2": + print("You use the door to the office") + currentRoom = "office" + + +# Choices in the office + elif currentRoom == "office": + if i in ["look","see","view","explore"]: + print("Oh I'm in an office, look theres Leslie. cool.") + + elif i in ["exit","walk","run","door","leave"]: + print("You use the door to exit the office. Bye Leslie!") + currentRoom = "neutralzone" + + elif i in ["talk","discuss","debate","ask","say"]: + print("Hiiiiii Leslie!") + print("Leslie: Hiiiiiii student, how can I help you?") + i = input() + if i in ["graduate","finish","degree"]: + if study == True: + print("no problem, here is your final degree. congratulations!") + graduation = True + else: + print("No way you are too stupid go to the aquarium and study") \ No newline at end of file