Draw a map in a string to make the render in the screen easier
This commit is contained in:
parent
182af96da0
commit
eb1e125d4e
|
@ -30,6 +30,9 @@ class Map:
|
||||||
for x, c in enumerate(line)] for y, line in enumerate(lines)]
|
for x, c in enumerate(line)] for y, line in enumerate(lines)]
|
||||||
return Map(width, height, tiles)
|
return Map(width, height, tiles)
|
||||||
|
|
||||||
|
def draw_string(self) -> str:
|
||||||
|
return "\n".join("".join(tile.char for tile in line) for line in self.tiles)
|
||||||
|
|
||||||
|
|
||||||
class Tile(Enum):
|
class Tile(Enum):
|
||||||
EMPTY = auto()
|
EMPTY = auto()
|
||||||
|
|
Loading…
Reference in New Issue