After successfully completing the puzzle, the user is asked whether they want to start a new game. If the answer is Yes, the procedure PromptNewGame() is called to begin a new puzzle. Otherwise, the procedure ClearBoard() is called to clear the board:
Sub PromptNewGame()
If MsgBox("Congratulations! Start a new game?", _
vbYesNo, "New Game?") = vbYes Then
StartGame
Else
ClearBoard
End If
End Sub
Additional Tips:
Enjoy playing, exploring the code, and creating your own extensions! For example:
- Provide multiple images and select one randomly for each new game.
- Adjust the number of puzzle pieces (e.g., 3×3, 4×4, 6×6) to control the difficulty level.
- Track time or number of moves to make it competitive.
- Add sound effects or animations for a more dynamic experience.