Add the game logic for the puzzles.