This is one of the simple 8 puzzle games most people have come across where the objective of the game is to move the 8 puzzle pieces around in a 3 by 3 grid in order to form a pattern.
- Use either your arrow keys or type in the number you wish to move
- A new puzzle can be generated at any time
- The game can also auto-solve itself if you give up
In this project, being able to make the game playable was easy, it was the auto-solving algorithm which was more difficult. While I could have researched online and discovered how to move the first tile to its correct position from anywhere and then the second etc. I chose to make an algorithm which looks at the previously made moves and works out the shortest route back through them. Overall, this makes a significantly more efficient program.