Skip to content

Commit

Permalink
sub : Modify js-1
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishanthnaa52 committed Jun 2, 2024
1 parent c4ef407 commit cbf9723
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
6 changes: 5 additions & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,11 @@
<p class="displayresult result"></p>
<p class="display-move"></p>
<p class="score-display"></p>
<button class="reset-button js-reset-btn">Reset score</button>
<button class="reset-button js-reset-btn" onclick=" score.wins = 0;
score.losses = 0;
score.ties = 0;
localStorage.removeItem('score');
display();">Reset score</button>
<button class="auto-button js-auto-btn">AUTO Play</button>
</center>
</body>
Expand Down
10 changes: 3 additions & 7 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,13 +150,9 @@ function autoPlay() {

}

document.querySelector('.js-rest-btn').addEventListener('click', () => {
score.wins = 0;
score.losses = 0;
score.ties = 0;
localStorage.removeItem('score');
display()
});
// document.querySelector('.js-rest-btn').addEventListener('click', () => {

// });

document.querySelector('.js-auto-btn').addEventListener('click',() => {
autoPlay();
Expand Down

0 comments on commit cbf9723

Please sign in to comment.