rock-paper-scissors-game-api
v1.0.0
Published
rock, paper and scissors game engine API
Readme
API for rock, paper and scissors game
API structure: { game: function(), acceptedInputs: Array }
game:
- @param {String} choice1 - either rock, paper or scissors
- @param {String} choice2 - either rock, paper or scissors
- @returns {object} - { verdict: String [Game result], choice1: Number [1 if choice1 wins else 0], choice2: Number [1 if choice2 wins else 0], error: Boolean [true if invalid input] }
acceptedInputs:
- @returns {Array} - ["rock", "paper", "scissors"]
