This commit is contained in:
Jonas Zeunert
2020-03-11 23:00:21 +01:00
parent dfe906fc57
commit b4190d0905
3 changed files with 11 additions and 4 deletions

View File

@@ -1,6 +1,6 @@
import asyncio
import signal
import logging
class Game:
def __init__(self, input_handler, events, game_state):
@@ -12,10 +12,11 @@ class Game:
pass
def interrupt(self):
print('Received SIGINT. Stopping Game :-)')
logging.info('Received SIGINT. Stopping Game :-)')
self.is_running.release()
async def run(self):
logging.info('Starting game')
await self.is_running.acquire()
await self.input_handler.handleInputs()