Canvas grid
The puzzle isn't working when I change the number of the canvas grid (4 is the default).
True it only works with a 4*4 grid (too complicated for the first level)
Found a solution!
delete this line j = canvas_grid, and add this one under the potential_spaces array: var j = potential_spaces.length;
and now it works with all canvas grids.
The problem was that the while loop was ending after finding the matching potential_spaces index, so the piece couldn't be moved.
@AlejandroGarciaPol awesome spot! thanks :-) would you mind opening a PR for this?
Oh wow, I've just realised how long ago this issue was opened! I never got the original notification?? :-(
Of course :), I just made the PR two days ago.