diff --git a/__pycache__/utils.cpython-310.pyc b/__pycache__/utils.cpython-310.pyc new file mode 100644 index 0000000..51a6e80 Binary files /dev/null and b/__pycache__/utils.cpython-310.pyc differ diff --git a/start.py b/master.py old mode 100644 new mode 100755 similarity index 67% rename from start.py rename to master.py index cca5996..6b0929d --- a/start.py +++ b/master.py @@ -7,15 +7,12 @@ from typing import NoReturn from utils import * def start_game() -> int: - proc = Popen(['./game.py']) + proc = Popen(['./start_game.sh']) proc.communicate() return proc.returncode def main() -> NoReturn: - if len(sys.argv) != 2: - print(f'Usage: {sys.argv[0]} TERMINAL_DEVICE') - sys.exit(1) - show_matrix(sys.argv[1]) + show_matrix() while True: if found_hands(): start_game() diff --git a/utils.py b/utils.py index 651ba56..aa90538 100644 --- a/utils.py +++ b/utils.py @@ -41,8 +41,8 @@ def collect_sfx() -> None: def start_sfx() -> None: Popen(['paplay', './assets/sfx/start.mp3']) -def show_matrix(term_dev: str) -> None: - Popen(['sh', '-c', '2>/dev/null tmatrix 1>"' + term_dev + '"']) +def show_matrix() -> None: + Popen(['tmatrix']) def found_hands() -> bool: capture: VideoCapture = cv2.VideoCapture(0)