redo screen system

This commit is contained in:
2026-06-24 18:10:41 -04:00
parent f40565d861
commit b86b3af5a3
5 changed files with 46 additions and 0 deletions

23
untitled/screens/house.py Normal file
View File

@@ -0,0 +1,23 @@
from untitled import model, persistence, ui
from untitled.screens.common import options
def house(save: model.Save):
print("Welcome to your house!")
while True:
match ui.select("What do you want to do?", ["Check on your cat", "Menu"]):
case "Check on your cat":
print(save.cat.name)
case "Menu":
result = options()
match result:
case "save":
print("Saving...")
persistence.save(save)
print("Done")
case "savequit":
if ui.confirm("Are you sure you want to quit?"):
print("Saving...")
persistence.save(save)
print("Done")
break