Akki-jaiswal / Akki-jaiswal/pong-game

Bonus Feature: Add High Score Tracking

Aperta
#145 2 commenti 0 reazioni 0 assegnatari Vedi su GitHub
Lingua principale
JavaScript
Stelle
22
Fork
116
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

Description:
The game currently tracks the score only for the current session. There’s no record of the highest score achieved by the user. Adding a high score feature would motivate players to improve their gameplay.

Suggested Implementation:

-Create a highScore state that stores the maximum score.
-Update it when ravneetScore exceeds the current high score.
-Save it to localStorage so it persists across sessions:

UI Display Ideas:

-Show High Score next to the current score in the top panel.
-Optionally add a 🎉 animation or badge when a new high score is reached.

Benefit:
This simple addition adds progression, motivation, and fun to the game.

Image

Guida per i contributori

Apri la guida per i contributori

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.