ze interrupt
This commit is contained in:
7
Game.py
7
Game.py
@@ -1,9 +1,8 @@
|
|||||||
import asyncio
|
import asyncio
|
||||||
import signal
|
import signal
|
||||||
import logging
|
import logging
|
||||||
from solenoids.BottomLeftBankSolenoid import BottomLeftBankSolenoid
|
import sys
|
||||||
from solenoids.BottomRightBankSolenoid import BottomRightBankSolenoid
|
|
||||||
from solenoids.TopCentralBankSolenoid import TopCentralBankSolenoid
|
|
||||||
|
|
||||||
class Game:
|
class Game:
|
||||||
def __init__(self, input_handler, events, game_state):
|
def __init__(self, input_handler, events, game_state):
|
||||||
@@ -15,7 +14,7 @@ class Game:
|
|||||||
|
|
||||||
def interrupt(self, _, __):
|
def interrupt(self, _, __):
|
||||||
logging.info('Received SIGINT. Stopping Game :-)')
|
logging.info('Received SIGINT. Stopping Game :-)')
|
||||||
self.is_running.release()
|
sys.exit(0)
|
||||||
|
|
||||||
async def run(self):
|
async def run(self):
|
||||||
logging.info('Starting game')
|
logging.info('Starting game')
|
||||||
|
|||||||
Reference in New Issue
Block a user