summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMinteck <contact@minteck.org>2022-05-09 22:19:51 +0200
committerMinteck <contact@minteck.org>2022-05-09 22:19:51 +0200
commitd4805039b8ea7b30f5e78cf53caf8fd3f267256a (patch)
tree1a8a77b20310dc7e137913cdb4f48367631f3631
parent88394101a513cf41dd4af1bb46881e7ae78bcf9f (diff)
downloadarcade-d4805039b8ea7b30f5e78cf53caf8fd3f267256a.tar.gz
arcade-d4805039b8ea7b30f5e78cf53caf8fd3f267256a.tar.bz2
arcade-d4805039b8ea7b30f5e78cf53caf8fd3f267256a.zip
Fix bug
-rwxr-xr-xrps/morpion/base.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/rps/morpion/base.js b/rps/morpion/base.js
index 511be33..e42b1ff 100755
--- a/rps/morpion/base.js
+++ b/rps/morpion/base.js
@@ -115,8 +115,10 @@ function checkWinner() {
if (me === rps.action.SCISSORS && other === rps.action.PAPER) state = rps.state.WIN;
if (state === rps.state.WIN) {
+ document.getElementById("counter-left-win").innerText = (document.getElementById("counter-left-win").innerText - 1 + 2).toString();
document.getElementById("last-games").innerText = "Played with " + window.peerName + "\nGame ended, you won.";
} else if (state === rps.state.LOSE) {
+ document.getElementById("counter-left-lose").innerText = (document.getElementById("counter-left-lose").innerText - 1 + 2).toString();
document.getElementById("last-games").innerText = "Played with " + window.peerName + "\nGame ended, you lost.";
} else {
document.getElementById("last-games").innerText = "Played with " + window.peerName + "\nGame ended, that's a draw.";