Mainloop+house

This commit is contained in:
2026-04-11 17:40:34 -04:00
parent f38fd535fb
commit 6b23548b26
3 changed files with 43 additions and 4 deletions

View File

@@ -1,5 +1,6 @@
import json
from data.cat import Cat
import os
class SaveData:
@@ -9,7 +10,9 @@ class SaveData:
def save(cat):
with open(f"{cat.name}.kitten", "w") as f:
if not os.path.exists("saves"):
os.mkdir("saves")
with open(f"saves/{cat.name}.kitten", "w") as f:
json.dump(cat.to_dict(), f)