Skip to content

Updated the UI of the 2048 Game and added some features. #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Krishcodes-awesomestuff
Copy link

@Krishcodes-awesomestuff Krishcodes-awesomestuff commented Apr 8, 2025

Pull Request for Play With Python 💡

Issue Title : Enhancement: Added Score System and Restart Feature to 2048 Game

  • Info about the related issue (Aim of the project) : Enhanced the 2048 game by adding score display, high score system with file persistence, and restart functionality to improve user experience
  • Name: Krishnaprasath Venkadesan
  • GitHub ID: Krishcodes-awesomestuff
  • Email ID: [email protected]
  • Idenitfy yourself: (Mention in which program you are contributing in.) python

Closes: #issue number that will be closed through this PR

Describe the add-ons or changes you've made 📃

  1. Added Score Display System:

    • Implemented real-time score display during gameplay
    • Score updates dynamically when tiles merge
    • Score display is prominently shown at the top of the game window
  2. High Score System Implementation:

    • Added persistent high score tracking using file storage
    • High score is maintained between game sessions
    • High score display updates automatically when broken
    • Uses 'high_score.txt' for score persistence
  3. Restart Functionality:

    • Added a restart button to the game interface
    • Allows players to start a fresh game at any time
    • Properly resets all game states while preserving high score
  4. Documentation Updates:

    • Updated README.md with new features and functions
    • Added documentation for new methods
    • Updated contributors list
  5. Code Improvements:

    • Added new methods for score management
    • Implemented game state management for restart feature
    • Enhanced user interface with new display elements

Type of change ☑️

What sort of change have you made:

  • Bug fix (non-breaking change which fixes an issue)
  • [x ] New feature (non-breaking change which adds functionality)
  • Code style update (formatting, local variables)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested? ⚙️

I ran it locally in my terminal, it works! no cap

Checklist: ☑️

  • My code follows the guidelines of this project.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly wherever it was hard to understand.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • I have added things that prove my fix is effective or that my feature works.
  • Any dependent changes have been merged and published in downstream modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant