first test
This commit is contained in:
6
Game.py
6
Game.py
@@ -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())
|
||||
|
||||
|
||||
Reference in New Issue
Block a user