Created
          August 5, 2013 01:46 
        
      - 
      
 - 
        
Save tantara/6152920 to your computer and use it in GitHub Desktop.  
  
    
      This file contains hidden or 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
    
  
  
    
  | 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