Pass the whole Map into MapGenerator.generate

This commit is contained in:
Eryn Wells 2023-02-18 22:55:20 -08:00
parent 7428d95126
commit 37ffa423b6
3 changed files with 27 additions and 16 deletions

View file

@ -12,7 +12,7 @@ import numpy as np
import numpy.typing as npt
import tcod
from ..engine import Configuration
from ..configuration import Configuration
from ..geometry import Point, Rect, Size
from .generator import MapGenerator
from .tile import Empty, Shroud
@ -28,7 +28,6 @@ class Map:
shape = map_size.numpy_shape
self.tiles = np.full(shape, fill_value=Empty, order='F')
generator.generate(self.tiles)
self.up_stairs = generator.up_stairs
self.down_stairs = generator.down_stairs
@ -42,6 +41,8 @@ class Map:
self.__walkable_points = None
generator.generate(self)
@property
def bounds(self) -> Rect:
'''The bounds of the map'''