intro
This commit is contained in:
6
justfile
6
justfile
@@ -6,8 +6,12 @@ lint:
|
|||||||
|
|
||||||
fmt:
|
fmt:
|
||||||
uv run ruff format
|
uv run ruff format
|
||||||
|
|
||||||
|
fix:
|
||||||
|
uv run ruff check --fix
|
||||||
|
|
||||||
typecheck:
|
typecheck:
|
||||||
uv run basedpyright
|
uv run basedpyright
|
||||||
|
|
||||||
|
|
||||||
check: lint test typecheck
|
check: lint test typecheck
|
||||||
@@ -1,6 +1,13 @@
|
|||||||
|
import time
|
||||||
|
|
||||||
|
from untitled import ui
|
||||||
|
|
||||||
|
|
||||||
class App:
|
class App:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
pass
|
pass
|
||||||
|
|
||||||
def run(self):
|
def run(self):
|
||||||
pass
|
ui.clear()
|
||||||
|
time.sleep(1)
|
||||||
|
ui.splash()
|
||||||
|
|||||||
2
untitled/content.py
Normal file
2
untitled/content.py
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
STUDIO_NAME = "Untitled Randomness Studios"
|
||||||
|
GAME_NAME = "Untitled Cat Game"
|
||||||
33
untitled/ui.py
Normal file
33
untitled/ui.py
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
import time
|
||||||
|
|
||||||
|
from untitled import content
|
||||||
|
|
||||||
|
|
||||||
|
def clear():
|
||||||
|
print("\033[2J\033[H", end="", flush=True)
|
||||||
|
|
||||||
|
|
||||||
|
def typewriter(
|
||||||
|
text,
|
||||||
|
letter_speed=0.15,
|
||||||
|
erase_multiplier=0.35,
|
||||||
|
after_type_delay=1,
|
||||||
|
after_finish_delay=1,
|
||||||
|
erase=True,
|
||||||
|
):
|
||||||
|
for char in text:
|
||||||
|
time.sleep(letter_speed)
|
||||||
|
print(char, end="", flush=True)
|
||||||
|
time.sleep(after_type_delay)
|
||||||
|
if erase:
|
||||||
|
for _ in range(len(text)):
|
||||||
|
print("\b \b", end="", flush=True)
|
||||||
|
time.sleep(letter_speed * erase_multiplier)
|
||||||
|
else:
|
||||||
|
clear()
|
||||||
|
time.sleep(after_finish_delay)
|
||||||
|
|
||||||
|
|
||||||
|
def splash():
|
||||||
|
typewriter(content.STUDIO_NAME)
|
||||||
|
typewriter(content.GAME_NAME, erase=False)
|
||||||
Reference in New Issue
Block a user