Add new div and extra text to msg when players tie
This commit is contained in:
parent
7edde3e168
commit
329920601b
2 changed files with 3 additions and 1 deletions
|
|
@ -22,6 +22,8 @@
|
||||||
<div class = "score-text">Compy: <span id = "computer">0</span></div>
|
<div class = "score-text">Compy: <span id = "computer">0</span></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="score-text">Rounds Played: <span id = "rounds">0</span></div>
|
||||||
|
|
||||||
<div id = "msg"></div>
|
<div id = "msg"></div>
|
||||||
|
|
||||||
<script src="script.js"></script>
|
<script src="script.js"></script>
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ function game() {
|
||||||
msg.textContent = "You win! " + psCap + " beats " + cs + ".";
|
msg.textContent = "You win! " + psCap + " beats " + cs + ".";
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
msg.textContent = "It's a tie!";
|
msg.textContent = "It's a tie! You both played " + cs + ".";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue