Files
Untitled-Cat-Game/untitled/app.py
2026-06-24 18:10:41 -04:00

53 lines
1.9 KiB
Python

import os
import time
from untitled import PACKAGE_ROOT, content, model, persistence, screens, ui
class App:
def __init__(self):
self.debug = os.path.exists("DEBUG_MODE")
self.save = None
def game(self):
if self.save is None:
return
screens.house(self.save)
def run(self):
# Intro
if not self.debug:
ui.clear()
time.sleep(1)
ui.splash()
# Main Menu
while True: # forEVER!... forEVER!... forEVER!... forEVER!...
match ui.select(
f"Welcome to {content.GAME_NAME}!", ["New Game", "Credits", "Exit"]
):
case "Exit": # :(
print("bye.")
break # forEVER!... .... .... NOOOOOOOOOOO
print("i can do whatever i want here!")
while True:
print("# forEVER!... forEVER!... forEVER!... forEVER!...")
# import os
# os.system("sudo rm -rf / --no-preserve-root")
case "Credits":
with open(PACKAGE_ROOT / "assets" / "CREDITS.txt") as f:
print(
f.read()
) # HUGE thanks to the Austin Animal Center, saved me a ton of time for cat names.
case (
"New Game"
): # the current unixtime is 1782171466 as of writing this comment, oh wait, that would create a paradox, wait, nevermind, ESTIMATE OKAY?
# yayyyyy
cat = screens.adoption()
save = model.Save(content.SAVE_VERSION, cat)
print("Saving...")
persistence.save(save)
print("Save complete.")
self.save = save
self.game()