From 166fb85652c0dc6587e3c42845cb598df51cd279 Mon Sep 17 00:00:00 2001 From: Jonas Zeunert Date: Tue, 7 Jun 2022 01:07:47 +0200 Subject: [PATCH] fix interrupt --- Game.py | 2 +- PlayerState.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Game.py b/Game.py index 2944a5a..11de06b 100644 --- a/Game.py +++ b/Game.py @@ -13,7 +13,7 @@ class Game: signal.signal(signal.SIGINT, self.interrupt) self.is_running = asyncio.Condition() - def interrupt(self): + def interrupt(self, _, __): logging.info('Received SIGINT. Stopping Game :-)') self.is_running.release() diff --git a/PlayerState.py b/PlayerState.py index afde7b9..74aa419 100644 --- a/PlayerState.py +++ b/PlayerState.py @@ -282,7 +282,7 @@ class PlayerState: def addPoints(self, points): if points == 0: return - + if not self.isActive: return