mirror of
https://github.com/maoakeEnterprise/amazing.git
synced 2026-04-28 16:04:35 +02:00
finish the thing
This commit is contained in:
+11
-2
@@ -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
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
#
|
||||
##
|
||||
|
||||
@@ -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]:
|
||||
|
||||
@@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user