Skip to content

fix : display final score when Whack-a-Mole game ends #1875

Description

@tmdeveloper007

Summary of What Needs to be Done

Fix games/Whack-a-Mole/Whack-a-Mole.py. When the game ends (after all rounds are played), the while loop while rnd <= rounds exits without displaying the final score or any game-over message. The variables score, misses, and reaction_times are accumulated throughout the game but never shown to the player when the game naturally ends. Only an early-quit path (using sys.exit(0)) exists, which does not display stats either.

Changes that Need to be Made

After the game loop exits (when rnd > rounds), display the final score summary including: total score, total misses, accuracy percentage, and average reaction time. This mirrors the end-of-game display found in other games in this repo.

Impact that it would Provide

Players will see their final performance statistics after completing a Whack-a-Mole session, improving the game experience.

Note: please assign this issue to the tmdeveloper007 account.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions