Skip to content

Commit aad0fe6

Browse files
Merge pull request steam-bell-92#648 from Pratikshya32/fix/rps-reset-best-streak
fix: reset best streak and best score on RPS game reset
2 parents fde3787 + 1e88d6e commit aad0fe6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

web-app/js/projects/rock-paper-scissor.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,10 @@ function initRockPaperScissor() {
506506
stats.losses = 0;
507507
stats.currentStreak = 0;
508508
playerHistory = [];
509+
stats.bestStreak = 0;
510+
bestScore = 0;
511+
storage.saveToStorage('rpsBestScore', 0);
512+
storage.saveToStorage('rpsStats', stats);
509513
updateScore();
510514
updateStatsDisplay();
511515
updateTendencyDisplay();

0 commit comments

Comments
 (0)