rock paper scissors pic code example
Example 1: rock paper scissors
My Rock Paper Scissor game:
https://codepen.io/Lorenzo-SC/pen/ExgpPEO
Please give me a like if you appreciate :)
Example 2: rock paper scissors algorithm
Rock: 0
Paper: 1
Scissors: 2
if ((playerTwoInput + 1) % 3 == playerOneInput)
return "Player 1 won";
else if ((playerOneInput + 1) % 3 == playerTwoInput)
return "Player 2 won";
else
return "Draw";