From ba4bb78166598a63f9c7fd6703b551a2203f8b8e Mon Sep 17 00:00:00 2001 From: Charles Peyrat Date: Fri, 16 Oct 2020 15:52:47 +0200 Subject: [PATCH] Added entities management to class Map --- dungeonbattle/interfaces.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/dungeonbattle/interfaces.py b/dungeonbattle/interfaces.py index 4a2339c..7824134 100644 --- a/dungeonbattle/interfaces.py +++ b/dungeonbattle/interfaces.py @@ -1,14 +1,16 @@ #!/usr/bin/env python + class Map: width: int height: int tiles: list - def __init__(self, width: int, height: int, tiles: list): + def __init__(self, width: int, height: int, tiles: list, entities: list): self.width = width self.height = height self.tiles = tiles + self.entities = entities @staticmethod def load(filename: str): @@ -22,7 +24,7 @@ class Map: lines = [line for line in lines if line] height = len(lines) width = len(lines[0]) - return Map(width, height, lines) + return Map(width, height, lines, []) class Entity: