2024-02-12 23:48:41 +00:00
|
|
|
from graphics import Window
|
2024-02-13 12:18:47 +00:00
|
|
|
from maze import Maze
|
2024-02-16 23:22:50 +00:00
|
|
|
from solver import Solver
|
2024-02-12 19:53:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
def main():
|
|
|
|
window = Window(800, 800)
|
2024-02-12 23:32:03 +00:00
|
|
|
|
2024-02-15 19:13:31 +00:00
|
|
|
game = Maze(
|
2024-02-15 01:40:16 +00:00
|
|
|
x_position=10,
|
|
|
|
y_position=10,
|
2024-02-16 23:22:50 +00:00
|
|
|
height=16,
|
|
|
|
width=16,
|
|
|
|
cell_height=40,
|
|
|
|
cell_width=40,
|
2024-02-15 01:40:16 +00:00
|
|
|
window=window
|
|
|
|
)
|
2024-02-13 10:48:26 +00:00
|
|
|
|
2024-02-16 23:22:50 +00:00
|
|
|
solver = Solver(game)
|
|
|
|
|
|
|
|
if solver.solve():
|
2024-02-15 19:13:31 +00:00
|
|
|
print("Maze solved successfully :)")
|
|
|
|
else:
|
|
|
|
print("I'm unable to solve the maze :(")
|
|
|
|
|
2024-02-15 01:40:16 +00:00
|
|
|
window.mainloop()
|
2024-02-12 19:53:45 +00:00
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
main()
|