A simple optial rock papper scissors backend written in JS
The main difference from this to every other rock papper scissors game out there is that, we do not ask "who won?" We know who won inherently.
Instead of using a long if else chain or even a switch statement the win conditions are simply an object, the combination of the different choices are then simply used as the keys for the value which stores whether the player on the right one or lost, its a siple performant and neat solution that required minimal code.