diff --git a/config.txt b/config.txt index 20cccbd..ba166ff 100644 --- a/config.txt +++ b/config.txt @@ -4,6 +4,6 @@ ENTRY=1,1 EXIT=5,7 OUTPUT_FILE=con PERFECT=True -GENERATOR=DFS +GENERATOR=Kruskal SOLVER=AStar SEED=168431 diff --git a/src/AMazeIng.py b/src/AMazeIng.py index 5688288..97dabc0 100644 --- a/src/AMazeIng.py +++ b/src/AMazeIng.py @@ -39,6 +39,8 @@ class AMazeIng(BaseModel): raise ValueError("Exit coordinates exceed the maze size") if self.entry == self.exit: raise ValueError("Entry and Exit coordinates cant be the same") + if self.width <= 10 or self.height <= 10: + print("Height or width to low for disply forty two logo") return self def generate(self) -> Generator[Maze, None, None]: diff --git a/src/mazegen/MazeGenerator.py b/src/mazegen/MazeGenerator.py index ddd5e26..a911562 100644 --- a/src/mazegen/MazeGenerator.py +++ b/src/mazegen/MazeGenerator.py @@ -295,6 +295,9 @@ class Kruskal(MazeGenerator): if height > 10 and width > 10: cells_ft = self.get_cell_ft(width, height) if cells_ft and (self.start in cells_ft or self.end in cells_ft): + print( + "Forty two will not be display. Entry or exit set in the ft logo" + ) cells_ft = None if seed is not None: @@ -383,6 +386,10 @@ class DepthFirstSearch(MazeGenerator): print(self.end) print(self.forty_two) visited = self.lock_cell_ft(visited, self.forty_two) + else: + print( + "Forty two will not be display. Entry or exit set in the ft logo" + ) path: list[tuple[int, int]] = list() w_h = (width, height) coord = (0, 0)