This commit is contained in:
2026-06-22 19:51:04 -04:00
parent 3f6f9599b5
commit 67cdcbca69
5 changed files with 131 additions and 5 deletions

View File

@@ -4,7 +4,9 @@ version = "0.1.0"
description = "Untitled Cat Game" description = "Untitled Cat Game"
readme = "README.md" readme = "README.md"
requires-python = ">=3.12" requires-python = ">=3.12"
dependencies = [] dependencies = [
"questionary>=2.1.1",
]
[dependency-groups] [dependency-groups]
dev = [ dev = [
@@ -18,6 +20,7 @@ target-version = "py313"
[tool.ruff.lint] [tool.ruff.lint]
extend-select = ["E", "F", "I", "UP", "B", "SIM"] extend-select = ["E", "F", "I", "UP", "B", "SIM"]
ignore = ["E501"] # hehe forEVER!... forEVER!... forEVER!...
[tool.basedpyright] [tool.basedpyright]
typeCheckingMode = "standard" typeCheckingMode = "standard"

View File

@@ -1,6 +1,27 @@
import random
import time import time
from untitled import ui from untitled import content, ui
def generate_cat_choice(personality=None):
size = random.choice(content.CAT_SIZES)
color = random.choice(content.CAT_COLORS)
eyes = random.choice(content.CAT_EYE_COLORS)
personality = personality or random.choice(content.CAT_PERSONALITIES)
article = "An" if size[0] in "aeiou" else "A"
description = f"{article} {size} {color} kitten with {eyes} eyes who {personality}"
return description, {
"size": size,
"color": color,
"eyes": eyes,
"personality": personality,
}
def generate_cat_choices(n=5):
personalities = random.sample(content.CAT_PERSONALITIES, n)
return [generate_cat_choice(p) for p in personalities]
class App: class App:
@@ -8,6 +29,32 @@ class App:
pass pass
def run(self): def run(self):
# Intro
ui.clear() ui.clear()
time.sleep(1) time.sleep(1)
ui.splash() ui.splash()
# Main Menu
while True: # forEVER!... forEVER!... forEVER!... forEVER!...
match ui.select(f"Welcome to {content.GAME_NAME}!", ["New Game", "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 (
"New Game"
): # the current unixtime is 1782171466 as of writing this comment, oh wait, that would create a paradox, wait, nevermind, ESTIMATE OKAY?
# yayyyyy
print("Welcome to the shelter!")
choice = "Reroll"
while choice == "Reroll":
choices = generate_cat_choices()
choice = ui.select(
"Please choose a cat to adopt!",
list(ui.Choice(cat[0], cat[1]) for cat in choices)
+ ["Reroll"],
)

View File

@@ -1,2 +1,34 @@
STUDIO_NAME = "Untitled Randomness Studios" STUDIO_NAME = "Untitled Randomness Studios" # Titled Randomness Studios
GAME_NAME = "Untitled Cat Game" GAME_NAME = "Untitled Cat Game" # Titled Cat Game
CAT_COLORS = [
"orange tabby",
"black",
"white",
"gray",
"tuxedo",
"calico",
"tortoiseshell",
"siamese",
"brown tabby",
"ginger",
]
CAT_SIZES = [
"tiny",
"small",
"average sized",
"big",
"chonky",
]
CAT_PERSONALITIES = [ # TODO: start at different happiness levels based on personality
"looks like trouble",
"judges you silently",
"won't stop meowing",
"seems half asleep",
"is staring at the wall",
"purrs endlessly",
"already knocked everything over",
"needs food right now",
"just wants to be somewhere else",
]
CAT_EYE_COLORS = ["green", "yellow", "blue", "orange"]

View File

@@ -1,5 +1,8 @@
import time import time
import questionary
from questionary import Choice as Choice
from untitled import content from untitled import content
@@ -31,3 +34,7 @@ def typewriter(
def splash(): def splash():
typewriter(content.STUDIO_NAME) typewriter(content.STUDIO_NAME)
typewriter(content.GAME_NAME, erase=False) typewriter(content.GAME_NAME, erase=False)
def select(title, options):
return questionary.select(title, options).ask()

37
uv.lock generated
View File

@@ -66,6 +66,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" }, { url = "https://files.pythonhosted.org/packages/54/20/4d324d65cc6d9205fabedc306948156824eb9f0ee1633355a8f7ec5c66bf/pluggy-1.6.0-py3-none-any.whl", hash = "sha256:e920276dd6813095e9377c0bc5566d94c932c33b27a3e3945d8389c374dd4746", size = 20538, upload-time = "2025-05-15T12:30:06.134Z" },
] ]
[[package]]
name = "prompt-toolkit"
version = "3.0.52"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "wcwidth" },
]
sdist = { url = "https://files.pythonhosted.org/packages/a1/96/06e01a7b38dce6fe1db213e061a4602dd6032a8a97ef6c1a862537732421/prompt_toolkit-3.0.52.tar.gz", hash = "sha256:28cde192929c8e7321de85de1ddbe736f1375148b02f2e17edd840042b1be855", size = 434198, upload-time = "2025-08-27T15:24:02.057Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/84/03/0d3ce49e2505ae70cf43bc5bb3033955d2fc9f932163e84dc0779cc47f48/prompt_toolkit-3.0.52-py3-none-any.whl", hash = "sha256:9aac639a3bbd33284347de5ad8d68ecc044b91a762dc39b7c21095fcd6a19955", size = 391431, upload-time = "2025-08-27T15:23:59.498Z" },
]
[[package]] [[package]]
name = "pygments" name = "pygments"
version = "2.20.0" version = "2.20.0"
@@ -91,6 +103,18 @@ wheels = [
{ url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" }, { url = "https://files.pythonhosted.org/packages/24/25/1de2678b631f5a49215c6c96fff41ba892b0a34df68d6d80292b1b48aa7f/pytest-9.1.1-py3-none-any.whl", hash = "sha256:37a86b45efb9a47a61a36449063e8e18d0cab3161329fc099eb21783169c4f0c", size = 386536, upload-time = "2026-06-19T10:58:31.347Z" },
] ]
[[package]]
name = "questionary"
version = "2.1.1"
source = { registry = "https://pypi.org/simple" }
dependencies = [
{ name = "prompt-toolkit" },
]
sdist = { url = "https://files.pythonhosted.org/packages/f6/45/eafb0bba0f9988f6a2520f9ca2df2c82ddfa8d67c95d6625452e97b204a5/questionary-2.1.1.tar.gz", hash = "sha256:3d7e980292bb0107abaa79c68dd3eee3c561b83a0f89ae482860b181c8bd412d", size = 25845, upload-time = "2025-08-28T19:00:20.851Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/3c/26/1062c7ec1b053db9e499b4d2d5bc231743201b74051c973dadeac80a8f43/questionary-2.1.1-py3-none-any.whl", hash = "sha256:a51af13f345f1cdea62347589fbb6df3b290306ab8930713bfae4d475a7d4a59", size = 36753, upload-time = "2025-08-28T19:00:19.56Z" },
]
[[package]] [[package]]
name = "ruff" name = "ruff"
version = "0.15.18" version = "0.15.18"
@@ -120,6 +144,9 @@ wheels = [
name = "untitled-cat-game" name = "untitled-cat-game"
version = "0.1.0" version = "0.1.0"
source = { editable = "." } source = { editable = "." }
dependencies = [
{ name = "questionary" },
]
[package.dev-dependencies] [package.dev-dependencies]
dev = [ dev = [
@@ -129,6 +156,7 @@ dev = [
] ]
[package.metadata] [package.metadata]
requires-dist = [{ name = "questionary", specifier = ">=2.1.1" }]
[package.metadata.requires-dev] [package.metadata.requires-dev]
dev = [ dev = [
@@ -136,3 +164,12 @@ dev = [
{ name = "pytest", specifier = ">=9.1.1" }, { name = "pytest", specifier = ">=9.1.1" },
{ name = "ruff", specifier = ">=0.15.18" }, { name = "ruff", specifier = ">=0.15.18" },
] ]
[[package]]
name = "wcwidth"
version = "0.8.1"
source = { registry = "https://pypi.org/simple" }
sdist = { url = "https://files.pythonhosted.org/packages/49/b4/51fe890511f0f242d07cb1ebe6a5b6db417262b9d2568b460347c57d95cc/wcwidth-0.8.1.tar.gz", hash = "sha256:faf5b4a5366a72dc49cad48cdf21f52bdf63bdda995178e483ba247ff79089b9", size = 1466072, upload-time = "2026-06-08T05:57:23.146Z" }
wheels = [
{ url = "https://files.pythonhosted.org/packages/bd/6e/95b0e537de1f4d4301f76f944642c6da50d1511cc7b3d64dc418a66c7509/wcwidth-0.8.1-py3-none-any.whl", hash = "sha256:f453740b1e4a4f3291faa37944c555d71056c4da08d59809b307ef4feba695c8", size = 323092, upload-time = "2026-06-08T05:57:21.413Z" },
]