Remove unnecessary text
This commit is contained in:
parent
ebbdf7cb73
commit
c34fc827e6
1 changed files with 5 additions and 5 deletions
10
script.js
10
script.js
|
|
@ -69,15 +69,15 @@ function game() {
|
||||||
case "player loses":
|
case "player loses":
|
||||||
cScore += 1;
|
cScore += 1;
|
||||||
computer.textContent = cScore;
|
computer.textContent = cScore;
|
||||||
msg.textContent = "You lose! " + cs + " beats " + ps + ". You: " + pScore + " Computer: " + cScore;
|
msg.textContent = "You lose! " + cs + " beats " + ps;
|
||||||
break;
|
break;
|
||||||
case "player wins":
|
case "player wins":
|
||||||
pScore += 1;
|
pScore += 1;
|
||||||
player.textContent = pScore;
|
player.textContent = pScore;
|
||||||
msg.textContent = "You lose! " + ps + " beats " + cs + ". You: " + pScore + " Computer: " + cScore;
|
msg.textContent = "You lose! " + ps + " beats " + cs;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
msg.textContent = "It's a tie! " + "You: " + pScore + " Computer: " + cScore;
|
msg.textContent = "It's a tie! ";
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -92,8 +92,8 @@ function endGame(){
|
||||||
let winner = (pScore > cScore) ? true : false;
|
let winner = (pScore > cScore) ? true : false;
|
||||||
|
|
||||||
if (winner) {
|
if (winner) {
|
||||||
msg.textContent = "You won the game " + pScore + " to " + cScore + "! Great job!";
|
msg.textContent = "You won the game! Great job!";
|
||||||
} else {
|
} else {
|
||||||
msg.textContent = "You lost the game " + pScore + " to " + cScore + ". Better luck next time!";
|
msg.textContent = "You lost the game. Better luck next time!";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in a new issue