summaryrefslogtreecommitdiff
path: root/pycameltris/screens/InGame.py
diff options
context:
space:
mode:
Diffstat (limited to 'pycameltris/screens/InGame.py')
-rw-r--r--pycameltris/screens/InGame.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/pycameltris/screens/InGame.py b/pycameltris/screens/InGame.py
index aa3e53b..7363f5a 100644
--- a/pycameltris/screens/InGame.py
+++ b/pycameltris/screens/InGame.py
@@ -2,6 +2,7 @@ import contextlib
from functools import partial
import random
import sys
+from typing import NoReturn
import pygame
@@ -254,7 +255,10 @@ class InGame(Screen):
self.screen = screen
self.event_handler = dict()
- self.event_handler[pygame.QUIT] = lambda _: sys.exit()
+ def exit(_) -> NoReturn:
+ sys.exit()
+
+ self.event_handler[pygame.QUIT] = exit
self.event_handler[pygame.KEYDOWN] = partial(handle_input_pressed, KeyboardController, self.players)
self.event_handler[pygame.KEYUP] = partial(handle_input_released, KeyboardController, self.players)
self.event_handler[pygame.JOYBUTTONDOWN] = partial(handle_input_pressed, JoystickController, self.players)