diff --git a/config.txt b/config.txt index 46e5b8c..ed23b45 100644 --- a/config.txt +++ b/config.txt @@ -2,7 +2,16 @@ WIDTH=10 HEIGHT=10 ENTRY=1,1 EXIT=10,10 -OUTPUT_FILE=maze.txt +OUTPUT_FILE=con PERFECT=True -GENERATOR=Kruskal +GENERATOR=DFS SOLVER=AStar +salut +# +# +# +# +# +# +# +## diff --git a/src/AMazeIng.py b/src/AMazeIng.py index 44d252d..29cf16a 100644 --- a/src/AMazeIng.py +++ b/src/AMazeIng.py @@ -36,6 +36,8 @@ class AMazeIng(BaseModel): raise ValueError("Entry coordinates exceed the maze size") if self.exit[0] > self.width or self.exit[1] > self.height: raise ValueError("Exit coordinates exceed the maze size") + if self.entry == self.exit: + raise ValueError("Entry and Exit coordinates cant be the same") return self def generate(self) -> Generator[Maze, None, None]: diff --git a/src/mazegen/MazeGenerator.py b/src/mazegen/MazeGenerator.py index f7ff2f1..560cf67 100644 --- a/src/mazegen/MazeGenerator.py +++ b/src/mazegen/MazeGenerator.py @@ -371,7 +371,7 @@ class DepthFirstSearch(MazeGenerator): if seed is not None: np.random.seed(seed) maze = self.init_maze(width, height) - if width > 9 and height > 9: + if width > 10 and height > 10: self.forty_two = self.get_cell_ft(width, height) visited: NDArray[np.object_] = np.zeros((height, width), dtype=bool) if (