Rock Paper Scissors is a game involving two players making pre-defined hand gestures at each other. The gesture that each player uses is played against the other, with a winner being decided based on the rules being used.
The three gestures used in base Rock Paper Scissors are... well... rock, paper, and scissors. The way these are scored is as such: Rock beats Scissors, Scissors beats Paper, Paper beats Rock. It gets a lot more complicated when you introduce new gestures, but let's keep it simple for now.
As always, we want you to create a backend for the game that we can use to hook up to our many game clients we're going to be creating. Once again, feel free to use any front-end to test your program.
We're definitely going to need a way to decide who has won and who has lost, or whether the round has ended in a draw. Using the rules provided, give us an engine for deciding this based on the player's moves.
As a player
I want rock to beat scissors
So that I can play with rules I'm familiar with
As a player
I want scissors to beat paper
So that I can play with rules I'm familiar with
As a player
I want paper to beat rock
So that I can play with rules I'm familiar with
As a player
I want the same moves to draw
So that I can play with rules I'm familiar with