the improved graduation plan

fruitual
suzan 2 years ago
parent 9699a3f915
commit 0b5baef751

@ -1,65 +1,107 @@
import os , time , random
currentRoom = "aquarium" currentRoom = "aquarium"
start = True start = True
graduation = False graduation = False
study = 0 study = 0
items = {
"aquarium": ["breadcube", "knife", "computer", "keyboard", "dragon", "candles", "meansofproduction"],
"neutralzone": ["students", "artworks", "offices", "sandwitches"],
"office": ["ideology", "propoganda", "pencilsharpener", "paint", "money"]
}
inventory = []
#seperating the text and printing in delay
def printer (text):
for t in text:
print(t, end = "", flush= True)
time.sleep(random.choice([0.01, 0.05, 0.1, 0.03, 0.02]))
print()
def taker(room):
if any(x in spliti for x in ["get", "grab", "take", "carry", "steal"]):
for item in items[room]:
if item in spliti:
printer("You took " + item)
inventory.append(item)
items[room].remove(item)
while True: while True:
if (start == True): if (start == True):
print("Graduation: The Game") printer("Graduation: The Game")
start = False start = False
if (graduation == True): if (graduation == True):
print("You Win!") printer("You Win!")
exit() exit()
i = input() i = input()
os.system("cls")
spliti = i.split(" ")
#inventory
if "inventory" in i:
printer("In you current inventory is " + ", ".join(inventory))
# Choices in the aquarium # Choices in the aquarium
if currentRoom == "aquarium": if currentRoom == "aquarium":
if i in ["look","see","view","explore"]: if i in ["look","see","view","explore"]:
print("Oh I'm in an aquarium cool") printer("Oh I'm in an aquarium cool")
printer("Oh look in the room! There is " + ", ".join(items["aquarium"]))
#finds the verb
elif i in ["exit","walk","run","door","leave"]: elif i in ["exit","walk","run","door","leave"]:
print("You use the door to exit the aquarium") printer("You use the door to exit the aquarium")
currentRoom = "neutralzone" currentRoom = "neutralzone"
elif i in ["learn","study","read", "pain", "frustration", "fun"]: elif i in ["learn","study","read", "pain", "frustration", "fun"]:
print("You have studied really hard. Noice") printer("You have studied really hard. Noice")
study = study + 30 study = study + 30
print("your ECTS is " + str(study) + " points") printer("your ECTS is " + str(study) + " points")
else:
taker("aquarium")
# Choices in the neutral zone # Choices in the neutral zone
elif currentRoom == "neutralzone": elif currentRoom == "neutralzone":
if i in ["look","see","view","explore"]: if i in ["look","see","view","explore"]:
print("Oh the BA students have a presentation. annoying.") printer("Oh the BA students have a presentation. annoying.")
printer("Oh look in the room! There is " + ", ".join(items["neutralzone"]))
elif i in ["exit","walk","run","door","leave"]: elif i in ["exit","walk","run","door","leave"]:
print("You use the door to exit the neutralzone") printer("You use the door to exit the neutralzone")
i = input("which door? (1 or 2)") i = input("which door? (1 or 2)")
if i == "1": if i == "1":
print("You use the door to the aquarium") printer("You use the door to the aquarium")
currentRoom = "aquarium" currentRoom = "aquarium"
elif i == "2": elif i == "2":
print("You use the door to the office") printer("You use the door to the office")
currentRoom = "office" currentRoom = "office"
else:
taker("neutralzone")
# Choices in the office # Choices in the office
elif currentRoom == "office": elif currentRoom == "office":
if i in ["look","see","view","explore"]: if i in ["look","see","view","explore"]:
print("Oh I'm in an office, look theres Leslie. cool.") printer("Oh I'm in an office, look theres Leslie. cool.")
printer("Oh look in the room! There is " + ", ".join(items["office"]))
elif i in ["exit","walk","run","door","leave"]: elif i in ["exit","walk","run","door","leave"]:
print("You use the door to exit the office. Bye Leslie!") printer("You use the door to exit the office. Bye Leslie!")
currentRoom = "neutralzone" currentRoom = "neutralzone"
elif i in ["talk","discuss","debate","ask","say"]: elif i in ["talk","discuss","debate","ask","say"]:
print("Hiiiiii Leslie!") printer("Hiiiiii Leslie!")
print("Leslie: Hiiiiiii student, how can I help you?") printer("Leslie: Hiiiiiii student, how can I help you?")
i = input() i = input()
if i in ["graduate","finish","degree"]: if i in ["graduate","finish","degree"]:
if study >= 119: if study >= 119:
print("no problem, here is your final degree. congratulations!") printer("no problem, here is your final degree. congratulations!")
graduation = True graduation = True
else: else:
print("No way you only have " + str(study) + " ECTS points. go to the aquarium and study") printer("No way you only have " + str(study) + " ECTS points. go to the aquarium and study")
else:
taker("office")
Loading…
Cancel
Save