Rename
This commit is contained in:
parent
15b53cd262
commit
aa2e9b27e1
Binary file not shown.
|
@ -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()
|
4
utils.py
4
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)
|
||||
|
|
Loading…
Reference in New Issue