mirror of
https://github.com/maoakeEnterprise/amazing.git
synced 2026-04-28 16:04:35 +02:00
add message when ft logo not display
This commit is contained in:
+1
-1
@@ -4,6 +4,6 @@ ENTRY=1,1
|
||||
EXIT=5,7
|
||||
OUTPUT_FILE=con
|
||||
PERFECT=True
|
||||
GENERATOR=DFS
|
||||
GENERATOR=Kruskal
|
||||
SOLVER=AStar
|
||||
SEED=168431
|
||||
|
||||
@@ -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]:
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user