diff --git a/squirrelbattle/game.py b/squirrelbattle/game.py index 6d9e9e7..3f94fd7 100644 --- a/squirrelbattle/game.py +++ b/squirrelbattle/game.py @@ -11,6 +11,7 @@ import sys from .entities.player import Player from .enums import GameMode, KeyValues, DisplayActions from .interfaces import Map, Logs +from .mapgeneration import randomwalk from .resources import ResourceManager from .settings import Settings from . import menus @@ -47,8 +48,7 @@ class Game: """ Create a new game on the screen. """ - # TODO generate a new map procedurally - self.map = Map.load(ResourceManager.get_asset_path("example_map.txt")) + self.map = randomwalk.Generator().run() self.map.logs = self.logs self.logs.clear() self.player = Player() diff --git a/squirrelbattle/mapgeneration/randomwalk.py b/squirrelbattle/mapgeneration/randomwalk.py index e4a95c8..ef0997d 100644 --- a/squirrelbattle/mapgeneration/randomwalk.py +++ b/squirrelbattle/mapgeneration/randomwalk.py @@ -1,6 +1,6 @@ from enum import auto, Enum from random import choice, random, randint -from dungeonbattle.interfaces import Map, Tile +from ..interfaces import Map, Tile DEFAULT_PARAMS = {"split_chance" : .15,