Skip to content

Instantly share code, notes, and snippets.

@tantara
Created August 5, 2013 01:46
Show Gist options
  • Save tantara/6152920 to your computer and use it in GitHub Desktop.
Save tantara/6152920 to your computer and use it in GitHub Desktop.
num = 3
seed = 10
cards = (1..22).to_a
all_hands = cards.permutation(num).to_a
srand(seed) # initialize
shuffled_hands = all_hands.shuffle
hands = shuffled_hands[0..seed]
puts hands.to_s
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment