Now with quadrants.
Still unsatisfied with the results, so many things that could be solved and it doesnt solve them.
Something about the heuristics...and tie breaking. I'm too burned out to think about it.
This stack:
- generates a base GridArray of 1s and 0s
- Splits the grid into 4 quadrants centered around the starting point
- Tries to search them all if the first main GridArray produces no path.
- The grids are modified (from 1 and 0) with some characters to indicate what is going on:
- unsearched/empty
- searched/neighbor
- blocked,
- the path
- visited
- Then it combines everything into a final array VisualGrid
- The VisualGrid array is read and converted into a PPM image
You can now click on the map, or return/enter in the fiels to initiate the test