python-mini-project icon indicating copy to clipboard operation
python-mini-project copied to clipboard

Update main.py

Open rohitgaikwad17 opened this issue 4 months ago • 0 comments

Fixed Core Game Logic: Correctly identifies the foreground color of the text to validate the user's input, which resolves a bug in the original logic.

Improved User Experience: Replaces the separate "HIGH SCORE" window with a simple messagebox.showinfo() to display the final score and the new highest score, keeping the game flow within a single window.

Centralized Game State: Introduced a game_started flag to prevent multiple timers from running, ensuring the game functions correctly on subsequent plays.

Added Restart Functionality: A new reset_game() function allows the user to easily restart and play again after the timer runs out.

Description

A short summary of what is included in your Pull Request.

Fixes #(issue_no)

  • [ ] Issue_no: <insert your issue no here>
  • [ ] Not applicable

Type of change

Choosing one or more options from the following as per the nature of your Pull request.

  • [ ] New project insert
  • [x] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Documentation Update

Project

  • Your Project Name:

  • Short Description: Provide a short desctiption of your Python project

Checklist:

Please tick all the boxes that are fulfilled by your Pull Request.

  • [ ] I have named my files and folder, according to this project's guidelines.
  • [x] My code follows the style guidelines of this project.
  • [ ] I have commented on my code, particularly in hard-to-understand areas.
  • [ ] I have created a helpful and easy to understand README.md, according to the given README_TEMPLATE.
  • [ ] My changes do not produce any warnings.

rohitgaikwad17 avatar Aug 03 '25 10:08 rohitgaikwad17