Skip to content

Instantly share code, notes, and snippets.

@recursivecodes
Created August 7, 2018 17:33
Show Gist options
  • Save recursivecodes/9e164768aae16c55b46d0149e5c77ba0 to your computer and use it in GitHub Desktop.
Save recursivecodes/9e164768aae16c55b46d0149e5c77ba0 to your computer and use it in GitHub Desktop.
// community cards
def communityCards = []
def burnPile = []
def deal = { int c = 0 ->
burnPile << deck.remove(0)
(0..( c - 1 )).each {
communityCards << deck.remove(0)
}
}
deal(3)
println "Flop --> ${communityCards}"
deal(1)
println "Turn --> ${communityCards}"
deal(1)
println "River --> ${communityCards}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment