Skip to content

Commit

Permalink
Update script.js
Browse files Browse the repository at this point in the history
  • Loading branch information
Luroto-92 committed Mar 26, 2024
1 parent 33e6e93 commit a33e162
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions script.js
Original file line number Diff line number Diff line change
@@ -1 +1,13 @@
/* Desenvolva seu código abaixo */
function playRockPaperScissor(jogador1, jogador2){
if (jogador1 == jogador2){
return "Empate!";
} else if ((jogador1 === "pedra" && jogador2 === "tesoura")||
(jogador1 === "papel" && jogador2 === "pedra")||
(jogador1 === "tesoura" && jogador2 === "papel"))
{
return "Jogador 1 Venceu!";
} else {
return "Jogador 2 Venceu!"
}
}

0 comments on commit a33e162

Please sign in to comment.