Compare commits
2 Commits
4d7badbd94
...
12214b7097
| Author | SHA1 | Date |
|---|---|---|
|
|
12214b7097 | |
|
|
8d6a96d546 |
|
|
@ -0,0 +1,31 @@
|
||||||
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
|
from time import sleep
|
||||||
|
from typing import NoReturn
|
||||||
|
|
||||||
|
from utils import *
|
||||||
|
|
||||||
|
def start_game() -> None:
|
||||||
|
proc = Popen(['./start_game.sh'])
|
||||||
|
proc.communicate()
|
||||||
|
|
||||||
|
def show_highscore() -> None:
|
||||||
|
Popen([
|
||||||
|
'tmux',
|
||||||
|
'display-popup',
|
||||||
|
'-E',
|
||||||
|
'watch',
|
||||||
|
'-tcn0',
|
||||||
|
r"""sh -c 'for _ in $(seq $(($(tput lines) / 3))); do printf "\n"; done; figlet -w $(tput cols) -c $(cat "/home/tosuman/42/hackthelobby/.score")'""",
|
||||||
|
])
|
||||||
|
|
||||||
|
def main() -> NoReturn:
|
||||||
|
show_matrix()
|
||||||
|
show_highscore()
|
||||||
|
while True:
|
||||||
|
if found_hands():
|
||||||
|
start_game()
|
||||||
|
sleep(1)
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||
11
master.py
11
master.py
|
|
@ -9,8 +9,19 @@ def start_game() -> None:
|
||||||
proc = Popen(['./start_game.sh'])
|
proc = Popen(['./start_game.sh'])
|
||||||
proc.communicate()
|
proc.communicate()
|
||||||
|
|
||||||
|
def show_highscore() -> None:
|
||||||
|
Popen([
|
||||||
|
'tmux',
|
||||||
|
'display-popup',
|
||||||
|
'-E',
|
||||||
|
'watch',
|
||||||
|
'-tcn.5',
|
||||||
|
r"""sh -c 'for _ in $(seq $(($(tput lines) / 3))); do printf "\n\033[31m"; done; figlet -w $(tput cols) -c $(cat "/home/tosuman/42/hackthelobby/.score")'""",
|
||||||
|
])
|
||||||
|
|
||||||
def main() -> NoReturn:
|
def main() -> NoReturn:
|
||||||
show_matrix()
|
show_matrix()
|
||||||
|
show_highscore()
|
||||||
while True:
|
while True:
|
||||||
if found_hands():
|
if found_hands():
|
||||||
start_game()
|
start_game()
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
TERM_FONT='SauceCodePro Nerd Font Mono'
|
TERM_FONT='SauceCodePro Nerd Font Mono'
|
||||||
TERM_FONT_SIZE='10'
|
TERM_FONT_SIZE='10'
|
||||||
OUT_TERM='xterm-mono'
|
OUT_TERM='xterm-mono'
|
||||||
# TERM_FULLSCREEN='-fullscreen'
|
TERM_FULLSCREEN='-fullscreen'
|
||||||
xterm \
|
xterm \
|
||||||
-bg black \
|
-bg black \
|
||||||
-fg white \
|
-fg white \
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue