gtg
This commit is contained in:
@@ -1,6 +1,27 @@
|
||||
import random
|
||||
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:
|
||||
@@ -8,6 +29,32 @@ class App:
|
||||
pass
|
||||
|
||||
def run(self):
|
||||
# Intro
|
||||
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", "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"],
|
||||
)
|
||||
|
||||
@@ -1,2 +1,34 @@
|
||||
STUDIO_NAME = "Untitled Randomness Studios"
|
||||
GAME_NAME = "Untitled Cat Game"
|
||||
STUDIO_NAME = "Untitled Randomness Studios" # Titled Randomness Studios
|
||||
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"]
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
import time
|
||||
|
||||
import questionary
|
||||
from questionary import Choice as Choice
|
||||
|
||||
from untitled import content
|
||||
|
||||
|
||||
@@ -31,3 +34,7 @@ def typewriter(
|
||||
def splash():
|
||||
typewriter(content.STUDIO_NAME)
|
||||
typewriter(content.GAME_NAME, erase=False)
|
||||
|
||||
|
||||
def select(title, options):
|
||||
return questionary.select(title, options).ask()
|
||||
|
||||
Reference in New Issue
Block a user