Merge branch 'master' into 'lighting'

# Conflicts:
#   squirrelbattle/display/mapdisplay.py
#   squirrelbattle/interfaces.py
This commit is contained in:
2021-01-07 16:36:54 +01:00
32 changed files with 1085 additions and 395 deletions

View File

@ -3,16 +3,23 @@
from squirrelbattle.interfaces import Map
from .display import Display
from ..game import Game
class MapDisplay(Display):
"""
A class to handle the display of the map.
"""
map: Map
def __init__(self, *args):
super().__init__(*args)
def update_map(self, m: Map) -> None:
self.map = m
self.pad = self.newpad(m.height, self.pack.tile_width * m.width + 1)
def update(self, game: Game) -> None:
self.map = game.map
self.pad = self.newpad(self.map.height,
self.pack.tile_width * self.map.width + 1)
def update_pad(self) -> None:
for j in range(len(self.map.tiles)):