From c34fc827e6b0c12760265cea9f2476a29e4730d8 Mon Sep 17 00:00:00 2001 From: lolabird Date: Tue, 7 Nov 2023 22:32:41 -0700 Subject: [PATCH] Remove unnecessary text --- script.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/script.js b/script.js index 849fe4a..62489f4 100644 --- a/script.js +++ b/script.js @@ -69,15 +69,15 @@ function game() { case "player loses": cScore += 1; computer.textContent = cScore; - msg.textContent = "You lose! " + cs + " beats " + ps + ". You: " + pScore + " Computer: " + cScore; + msg.textContent = "You lose! " + cs + " beats " + ps; break; case "player wins": pScore += 1; player.textContent = pScore; - msg.textContent = "You lose! " + ps + " beats " + cs + ". You: " + pScore + " Computer: " + cScore; + msg.textContent = "You lose! " + ps + " beats " + cs; break; default: - msg.textContent = "It's a tie! " + "You: " + pScore + " Computer: " + cScore; + msg.textContent = "It's a tie! "; break; } } @@ -92,8 +92,8 @@ function endGame(){ let winner = (pScore > cScore) ? true : false; if (winner) { - msg.textContent = "You won the game " + pScore + " to " + cScore + "! Great job!"; + msg.textContent = "You won the game! Great job!"; } else { - msg.textContent = "You lost the game " + pScore + " to " + cScore + ". Better luck next time!"; + msg.textContent = "You lost the game. Better luck next time!"; } } \ No newline at end of file