small medium large xlarge

Generic-user-small
02 May 2016, 00:21
Tony Dahbura (2 posts)

Trying to see the best way to maintain a solution of the maze as it is generated versus applying an algorithm to solve it once drawn.

Anyone have any thoughts on this? I was thinking something like an array of the cell coordinates versus a duplicate of the entire grid?

Thoughts?

Tony

Generic-user-small
13 Sep 2017, 14:45
J. Cliff Dyer (1 post)

Consider tracking the moves instead of the positions. In a 2d, cartesian grid, you can represent each move with two bits of information: 00 = up, 01 = down, 10 = left, 11 = right. Each byte gives you four moves, and there are fewer ways to encode invalid state.

You must be logged in to comment