From 8751120fe1f9be5275ec08c6a74bb862a89ab5d8 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Fri, 11 Dec 2020 02:17:00 +0100 Subject: [PATCH] Merge master into map_generation, there were some commit behind --- squirrelbattle/game.py | 4 ++-- squirrelbattle/mapgeneration/randomwalk.py | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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,