|
|
|
@ -325,7 +325,12 @@ if __name__ == '__main__':
@@ -325,7 +325,12 @@ if __name__ == '__main__':
|
|
|
|
|
inp1 = BalanceInput((host, int(port)), 0) |
|
|
|
|
inp2 = BalanceInput((host, int(port)), 1) |
|
|
|
|
|
|
|
|
|
while inp1.get_event() != InputEvent.STEP_ON: |
|
|
|
|
while True: |
|
|
|
|
evt = inp1.get_event() |
|
|
|
|
if evt == InputEvent.STEP_ON: |
|
|
|
|
break |
|
|
|
|
elif evt == InputEvent.QUIT: |
|
|
|
|
sys.exit() |
|
|
|
|
time.sleep(0.05) |
|
|
|
|
|
|
|
|
|
init_frame = create_init_screen(dim) |
|
|
|
@ -363,10 +368,14 @@ if __name__ == '__main__':
@@ -363,10 +368,14 @@ if __name__ == '__main__':
|
|
|
|
|
wait_time = 3 |
|
|
|
|
start = time.time() |
|
|
|
|
while time.time() < start+wait_time: |
|
|
|
|
if inp2.get_event() == InputEvent.STEP_ON: |
|
|
|
|
while True: |
|
|
|
|
evt = inp2.get_event() |
|
|
|
|
if evt == InputEvent.STEP_ON: |
|
|
|
|
inp1.running = False |
|
|
|
|
inp2.running = False |
|
|
|
|
start_game(game, 2) |
|
|
|
|
elif evt == InputEvent.QUIT: |
|
|
|
|
sys.exit() |
|
|
|
|
time.sleep(0.1) |
|
|
|
|
|
|
|
|
|
inp1.running = False |
|
|
|
|