Comment by Crestwave
2 days ago
A "free side" means being exposed on the left or right, matching your Wikipedia quote. On the other hand, OP's implementation checks if it can be moved up or down.
2 days ago
A "free side" means being exposed on the left or right, matching your Wikipedia quote. On the other hand, OP's implementation checks if it can be moved up or down.
Look at the shape of the puzzle and compare with the wikipedia photo. The sides logic is correct.
Although looks like the images on the tiles were indeed rotated, as mentioned in another comment[1].
[1]: https://news.ycombinator.com/item?id=47115499