Skip to content

Instantly share code, notes, and snippets.

@jasongorman
Created April 3, 2020 08:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jasongorman/481426ba38b7978b54ea96e5eb81658c to your computer and use it in GitHub Desktop.
Save jasongorman/481426ba38b7978b54ea96e5eb81658c to your computer and use it in GitHub Desktop.
function playHand(opponent, score, beats, losesTo) {
if (opponent === beats) {
score.player1++;
} else {
if (opponent === losesTo) {
score.player2++;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment