Created
August 7, 2018 17:23
-
-
Save recursivecodes/27b4c9eeefc5e9ea965efeba60aeac14 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
println "Shuffled deck--> ${deck}" | |
def hands = [ [], [], [], [], [], [], [], [] ] | |
def cardsPerPlayer = 2 | |
(0..cardsPerPlayer-1).each { | |
hands.each { | |
it << deck.remove(0) | |
} | |
} | |
println "Player hands--> ${hands}" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment