diff --git a/squirrelbattle/display/messagedisplay.py b/squirrelbattle/display/messagedisplay.py index 34c6586..9e4ffae 100644 --- a/squirrelbattle/display/messagedisplay.py +++ b/squirrelbattle/display/messagedisplay.py @@ -5,6 +5,10 @@ from squirrelbattle.display.display import Box, Display class MessageDisplay(Display): + """ + Display a message in a popup. + """ + def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) diff --git a/squirrelbattle/game.py b/squirrelbattle/game.py index 4553392..4eb38c1 100644 --- a/squirrelbattle/game.py +++ b/squirrelbattle/game.py @@ -72,6 +72,10 @@ class Game: Indicates what should be done when the given key is pressed, according to the current game state. """ + if self.message: + self.message = None + return + if self.state == GameMode.PLAY: self.handle_key_pressed_play(key) elif self.state == GameMode.MAINMENU: