CheckPuzzle solved?

Hi, i've downloaded your code and it works great!! But i have a issue, i do not know how to check when the puzzle is solved, Is there any check in your code? How could i add this feature?

Thx in advance!!