Skip to content

Commit

Permalink
- hide .game-info as soon as the results are unambiguous
Browse files Browse the repository at this point in the history
  • Loading branch information
TobiasMue91 committed Mar 24, 2024
1 parent e66e0a8 commit b025c43
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions games/rock_paper_scissors_mp.html
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ <h1>Rock Paper Scissors</h1>
}

onValue(gameRef, (snapshot) => {
document.getElementById('game-info').classList.add('hidden');
const game = snapshot.val();
if (!game) return;
const {player1Choice, player2Choice} = game;
Expand Down

0 comments on commit b025c43

Please sign in to comment.