mikepound / mazesolving

A variety of algorithms to solve mazes from an input image
The Unlicense
1.74k stars 411 forks source link

Customizing start and end points in maze #21

Open charanpool opened 4 years ago

charanpool commented 4 years ago

Hi,

The code works assuming that the start coordinate is always painted in white in the top row and end coordinate is always painted in white in the bottom row of the maze.

If we want to customize them, what are the changes needs to be made to specify start and end coordinates?

My Observation: Assume the start point to be (101, 13) Inside the mazes.py if we specify the start coordinate at line 19 as

self.start = Maze.Node((13,101)) instead of self.start = Maze.Node((0,x))

then the resultant image consisted of the path that is excluding the position (101, 13). It is because the Neighbours[] is not configured properly for the assumed start point. It is not a proper way to change manually te Neighbours[] of assumed start node.

How to fix it? Or please suggest some other way to customize the start and end coordinates.

Thanks in advance!!