Cover settings

This commit is contained in:
Yohann D'ANELLO
2020-11-11 22:45:15 +01:00
parent 0c17e74d6a
commit caef8dc9b2
3 changed files with 40 additions and 5 deletions

View File

@ -1,5 +1,5 @@
from random import randint
from typing import Any
from typing import Any, Optional
from .entities.player import Player
from .enums import GameMode, KeyValues
@ -56,7 +56,8 @@ class Game:
self.handle_key_pressed(
*KeyValues.translate_key(key, self.settings))
def handle_key_pressed(self, key: KeyValues, raw_key: str = '') -> None:
def handle_key_pressed(self, key: Optional[KeyValues], raw_key: str = '')\
-> None:
"""
Indicates what should be done when the given key is pressed,
according to the current game state.