stuff
This commit is contained in:
1
main.py
1
main.py
@@ -2,6 +2,7 @@ from untitled.app import App
|
|||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
print("Loading...")
|
||||||
app = App()
|
app = App()
|
||||||
app.run()
|
app.run()
|
||||||
|
|
||||||
|
|||||||
@@ -25,4 +25,3 @@ def test_generated_names_pass_filters():
|
|||||||
name = generation.generate_name()
|
name = generation.generate_name()
|
||||||
assert rules.validate_cat_name(name, auto_gen=True) is None
|
assert rules.validate_cat_name(name, auto_gen=True) is None
|
||||||
assert any(c in "aeiouy" for c in name.lower())
|
assert any(c in "aeiouy" for c in name.lower())
|
||||||
assert len(name) <= 9
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import os
|
import os
|
||||||
import time
|
import time
|
||||||
|
|
||||||
from untitled import PACKAGE_ROOT, content, screens, ui
|
from untitled import PACKAGE_ROOT, content, model, persistence, screens, ui
|
||||||
|
|
||||||
|
|
||||||
class App:
|
class App:
|
||||||
@@ -37,4 +37,8 @@ class App:
|
|||||||
"New Game"
|
"New Game"
|
||||||
): # the current unixtime is 1782171466 as of writing this comment, oh wait, that would create a paradox, wait, nevermind, ESTIMATE OKAY?
|
): # the current unixtime is 1782171466 as of writing this comment, oh wait, that would create a paradox, wait, nevermind, ESTIMATE OKAY?
|
||||||
# yayyyyy
|
# yayyyyy
|
||||||
screens.adoption()
|
cat = screens.adoption()
|
||||||
|
save = model.Save(content.SAVE_VERSION, cat)
|
||||||
|
print("Saving...")
|
||||||
|
persistence.save(save)
|
||||||
|
print("Save complete.")
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
STUDIO_NAME = "Untitled Randomness Studios" # Titled Randomness Studios
|
STUDIO_NAME = "Untitled Randomness Studios" # Titled Randomness Studios
|
||||||
GAME_NAME = "Untitled Cat Game" # Titled Cat Game
|
GAME_NAME = "Untitled Cat Game" # Titled Cat Game
|
||||||
|
|
||||||
|
SAVE_VERSION = 1
|
||||||
|
|
||||||
CAT_COLORS = [
|
CAT_COLORS = [
|
||||||
"orange tabby",
|
"orange tabby",
|
||||||
"black",
|
"black",
|
||||||
|
|||||||
@@ -7,8 +7,8 @@ def validate_cat_name(name, auto_gen=False):
|
|||||||
if len(name) < 4 or len(name) > 24:
|
if len(name) < 4 or len(name) > 24:
|
||||||
return "Your cat's name must be 4-24 characters long."
|
return "Your cat's name must be 4-24 characters long."
|
||||||
else:
|
else:
|
||||||
if len(name) > 9:
|
if len(name) < 4 or len(name) > 9:
|
||||||
return "Your cat's name must be below 9 characters long."
|
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):
|
if not all(c in ALLOWED for c in name):
|
||||||
return "Your cat's name can only have letters and numbers."
|
return "Your cat's name can only have letters and numbers."
|
||||||
if not any(c in string.ascii_letters for c in name):
|
if not any(c in string.ascii_letters for c in name):
|
||||||
|
|||||||
Reference in New Issue
Block a user