Rock, Paper, Scissors Simulation
GitHub Repository: HERE
Made with: Visual Studio, NodeJS
Programming Language: JavaScript
How to Play
Rock Paper Scissors (also known by Rochambeau, roshambo, or ro-sham-bo) is a hand game originating from China, usually played between two people, in which each player simultaneously forms one of three shapes with an outstretched hand. These shapes are "rock" (a closed fist), "paper" (a flat hand), and "scissors" (a fist with the index finger and middle finger extended, forming a V).
Rules
Rock wins against scissors
Rock losses against paper
Paper wins against Rock
Paper losses against Scissors
Scissors wins against Paper
Scissors losses against Rock
Same Hand Sign is a TIE
Program
While it may seem apparent at this point. The program created is a simulation of Rock, Paper, and Scissors. Here the program has two artificially made opponents who play each other and generate a random outcome. Since there are only three moves that can be made. Both opponents generate a random number between 0 and 2 (0, 1, 2 = three different numbers). Once the number is generated it is then assigned a hand gesture. For example, the number 0 would correlate to the hand gesture of the rock gesture. Once the hand signs are given to the opponents the rules must then be initialized within the code so that the program can function as intended. Where there is a determined winner, a loser, or a tie between the two.