Add new div and extra text to msg when players tie

This commit is contained in:
lolabird 2023-11-08 01:56:49 -07:00
commit 329920601b
2 changed files with 3 additions and 1 deletions

View file

@ -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>

View file

@ -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;
} }
} }