Thanks.
Note that not all configurations of the puzzle are solvable. My check for $inversions % 2 == 0 makes sure we get a solvable configuration. I don't see anything comparable in your code, though it could be I'm just not seeing it.
In reply to Re^2: The 15 Puzzle
by msh210
in thread The 15 Puzzle
by msh210
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |