Removed points in case of Tie

This commit is contained in:
NetMan 2024-01-09 18:59:37 +01:00
parent 807ce0487b
commit b83b1ed631
1 changed files with 0 additions and 2 deletions

View File

@ -11,8 +11,6 @@ function playRound(playerChoice, computerChoice) {
let computerChoiceCapital = computerChoice.slice(0,1).toUpperCase() + computerChoice.slice(1,computerChoice.length) let computerChoiceCapital = computerChoice.slice(0,1).toUpperCase() + computerChoice.slice(1,computerChoice.length)
if (playerChoice == computerChoice) { if (playerChoice == computerChoice) {
points.playerAddPoints();
points.computerAddPoints();
return `It's a tie! ${playerChoiceCapital} vs ${computerChoiceCapital}.`; return `It's a tie! ${playerChoiceCapital} vs ${computerChoiceCapital}.`;
} else if ((playerChoice == "rock" && computerChoice == "paper") } else if ((playerChoice == "rock" && computerChoice == "paper")
|| (playerChoice == "paper" && computerChoice == "scissors") || (playerChoice == "paper" && computerChoice == "scissors")