1.0.0 • Published 4 years ago
rock-paper-scissors-game-api v1.0.0
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"
1.0.0
4 years ago