Sure! Here's an example of a simple puzzle game implemented as a single HTML file using JavaScript:
This implementation represents a simple 8-puzzle game, where the objective is to arrange the numbers 1 to 8 in ascending order. The script generates a random shuffle of the puzzle at the beginning, and the player can click on the cells to move them into the empty position. When the puzzle is solved, an alert message is displayed.
Note: This implementation is based on the assumption that the game is played on a desktop or laptop computer rather than a smartphone. However, it should still work on smartphones with touch functionality.