diff --git a/main.py b/main.py index b2def7a..efc820e 100644 --- a/main.py +++ b/main.py @@ -2,6 +2,7 @@ from untitled.app import App def main(): + print("Loading...") app = App() app.run() diff --git a/tests/test_generation.py b/tests/test_generation.py index d5172c9..78301c4 100644 --- a/tests/test_generation.py +++ b/tests/test_generation.py @@ -25,4 +25,3 @@ def test_generated_names_pass_filters(): name = generation.generate_name() assert rules.validate_cat_name(name, auto_gen=True) is None assert any(c in "aeiouy" for c in name.lower()) - assert len(name) <= 9 diff --git a/untitled/app.py b/untitled/app.py index 315344d..49f8f5f 100644 --- a/untitled/app.py +++ b/untitled/app.py @@ -1,7 +1,7 @@ import os import time -from untitled import PACKAGE_ROOT, content, screens, ui +from untitled import PACKAGE_ROOT, content, model, persistence, screens, ui class App: @@ -37,4 +37,8 @@ class App: "New Game" ): # the current unixtime is 1782171466 as of writing this comment, oh wait, that would create a paradox, wait, nevermind, ESTIMATE OKAY? # yayyyyy - screens.adoption() + cat = screens.adoption() + save = model.Save(content.SAVE_VERSION, cat) + print("Saving...") + persistence.save(save) + print("Save complete.") diff --git a/untitled/content.py b/untitled/content.py index b0fa9f2..359a011 100644 --- a/untitled/content.py +++ b/untitled/content.py @@ -1,6 +1,8 @@ STUDIO_NAME = "Untitled Randomness Studios" # Titled Randomness Studios GAME_NAME = "Untitled Cat Game" # Titled Cat Game +SAVE_VERSION = 1 + CAT_COLORS = [ "orange tabby", "black", diff --git a/untitled/rules.py b/untitled/rules.py index 28f6855..11cbc98 100644 --- a/untitled/rules.py +++ b/untitled/rules.py @@ -7,8 +7,8 @@ def validate_cat_name(name, auto_gen=False): if len(name) < 4 or len(name) > 24: return "Your cat's name must be 4-24 characters long." else: - if len(name) > 9: - return "Your cat's name must be below 9 characters long." + if len(name) < 4 or len(name) > 9: + return "Your cat's name must be greater than 3 characters and below 9 characters long." if not all(c in ALLOWED for c in name): return "Your cat's name can only have letters and numbers." if not any(c in string.ascii_letters for c in name):