Skip to content

Instantly share code, notes, and snippets.

@waterlink
Created October 15, 2018 15:51
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 waterlink/13580e5e9c5e0adf5aafb6ca599be44e to your computer and use it in GitHub Desktop.
Save waterlink/13580e5e9c5e0adf5aafb6ca599be44e to your computer and use it in GitHub Desktop.
step - 11
val firstWins = rules(first, second) {
SCISSORS beats PAPER ||
PAPER beats ROCK ||
ROCK beats SCISSORS
}
if (firstWins) {
return FIRST_PLAYER
}
return SECOND_PLAYER
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment