Created
August 7, 2018 17:33
-
-
Save recursivecodes/9e164768aae16c55b46d0149e5c77ba0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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