Yes indeed I didnt implement a logic to avoid impossible puzzle.
That's something I'll put in place if I would continue on the project.
(NB: I also reviewed your game!)