Skip to content

Commit eab4f93

Browse files
committed
Maze Solver SbSp: Fix a bug
1 parent 777b26f commit eab4f93

File tree

1 file changed

+5
-3
lines changed
  • python-maze-solver/source_code_final/src/maze_solver

1 file changed

+5
-3
lines changed

python-maze-solver/source_code_final/src/maze_solver/__main__.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@
88

99
def main() -> None:
1010
maze = Maze.load(parse_path())
11-
renderer = SVGRenderer()
12-
for solution in solve_all(maze):
13-
renderer.render(maze, solution).preview()
11+
solutions = solve_all(maze)
12+
if solutions:
13+
renderer = SVGRenderer()
14+
for solution in solutions:
15+
renderer.render(maze, solution).preview()
1416
else:
1517
print("No solution found")
1618

0 commit comments

Comments
 (0)