first test

This commit is contained in:
Jonas Zeunert
2020-02-13 20:16:10 +01:00
parent 7414734dad
commit 86ff8e6dd9
12 changed files with 42 additions and 7 deletions

View File

@@ -3,9 +3,9 @@ import signal
class Game:
def __init__(self, input_handler, player_state, game_state):
def __init__(self, input_handler, events, game_state):
self.input_handler = input_handler
self.player_state = player_state
self.events = events
self.game_state = game_state
signal.signal(signal.SIGINT, self.interrupt)
self.is_running = asyncio.Condition()
@@ -15,7 +15,7 @@ class Game:
print('Received SIGINT. Stopping Game :-)')
self.is_running.release()
def run(self):
async def run(self):
self.is_running.acquire()
asyncio.run(self.input_handler.handleInputs())