function play(game, player1, player2) { | |
let score = {...game.score}; | |
let winner = undefined; | |
const hands = { | |
rock: () => playHand(player2, score, scissors, paper), | |
paper: () => playHand(player2, score, rock, scissors), | |
scissors: () => playHand(player2, score, paper, rock) | |
}; | |
hands[player1].call(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment