|
|
@ -367,18 +367,17 @@ if __name__ == '__main__': |
|
|
|
|
|
|
|
|
|
|
|
p2_frame = create_2player_screen(dim) |
|
|
|
p2_frame = create_2player_screen(dim) |
|
|
|
out.sendFrame(p2_frame) |
|
|
|
out.sendFrame(p2_frame) |
|
|
|
wait_time = 3 |
|
|
|
wait_time = 2 |
|
|
|
start = time.time() |
|
|
|
start = time.time() |
|
|
|
while time.time() < start+wait_time: |
|
|
|
while time.time() < start+wait_time: |
|
|
|
while True: |
|
|
|
evt = inp2.get_event() |
|
|
|
evt = inp2.get_event() |
|
|
|
if inp2.player_present: |
|
|
|
if inp2.player_present: |
|
|
|
inp1.running = False |
|
|
|
inp1.running = False |
|
|
|
inp2.running = False |
|
|
|
inp2.running = False |
|
|
|
start_game(game, 2) |
|
|
|
start_game(game, 2) |
|
|
|
elif evt == InputEvent.QUIT: |
|
|
|
elif evt == InputEvent.QUIT: |
|
|
|
sys.exit() |
|
|
|
sys.exit() |
|
|
|
time.sleep(0.1) |
|
|
|
time.sleep(0.1) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
inp1.running = False |
|
|
|
inp1.running = False |
|
|
|
inp2.running = False |
|
|
|
inp2.running = False |
|
|
|