Merge branch 'master' into 'familiars'

# Conflicts:
#   squirrelbattle/display/display_manager.py
#   squirrelbattle/display/logsdisplay.py
#   squirrelbattle/display/mapdisplay.py
#   squirrelbattle/display/menudisplay.py
#   squirrelbattle/menus.py
This commit is contained in:
eichhornchen
2021-01-05 10:27:39 +01:00
15 changed files with 167 additions and 57 deletions

View File

@ -2,6 +2,7 @@
# SPDX-License-Identifier: GPL-3.0-or-later
from squirrelbattle.display.display import Display
from squirrelbattle.game import Game
from squirrelbattle.interfaces import Logs
@ -9,12 +10,14 @@ class LogsDisplay(Display):
"""
A class to handle the display of the logs.
"""
logs: Logs
def __init__(self, *args) -> None:
super().__init__(*args)
self.pad = self.newpad(self.rows, self.cols)
def update_logs(self, logs: Logs) -> None:
self.logs = logs
def update(self, game: Game) -> None:
self.logs = game.logs
def display(self) -> None:
messages = self.logs.messages[-self.height:]