I like the fifteen puzzle..
but why is it that in two thirds of the implementations the squares are sorted into the field by random? Since I got to the infamous 14-15-positioning which is proven to be unsolveable I assume you too simply randomized the squares. This results in about 50% of unsolvable settings.
I recommend starting from the solution and randomly exchanging a square adjacent to the hole with the hole.