pub fn deal_four_players(cards: &mut Vec<Card>) -> Vec<Vec<Card>> {
    assert_eq!(cards.len(), 52);
    shuffle(cards);
    let mut hands = vec![vec![], vec![], vec![], vec![]];

    let mut i = 0;
    while cards.len() > 0 {
        &hands[i].push(cards.pop().unwrap());
        i = (i + 1) % 4;
    }

    return hands;
}
/// Used to reshuffle a deck of cards, panics if the `cards` does not have 52 elements (should only be used on a "full" deck).
Used to reshuffle a deck of cards, panics if the `cards` does not have 52 elements (should only be used on a "full" deck).
Used to reshuffle a deck of cards panics if the ` cards ` does not have 52 elements ( should only be used on a " full " deck ) .
pub fn deal_four_players(cards: &mut Vec<Card>) -> Vec<Vec<Card>> {
    assert_eq!(cards.len(), 52);
    shuffle(cards);
    let mut hands = vec![vec![], vec![], vec![], vec![]];
    let mut i = 0;
    while cards.len() > 0 {
        &hands[i].push(cards.pop().unwrap());
        i = (i + 1) % 4;
    }
    return hands;
}
pub fn deal_four_players ( cards : & mut Vec < Card > ) -> Vec < Vec < Card > > { assert_eq ! ( cards len ( ) 52 ) ; shuffle ( cards ) ; let mut hands = vec ! [ vec [ ] vec [ ] vec [ ] vec [ ] ] ; let mut i = 0 ; while cards . len ( ) > 0 { & hands [ i ] . push ( cards . pop ( ) . unwrap ( ) ) ; i = ( i + 1 ) % 4 ; } return hands ; }
Used to reshuffle a deck of cards, panics if the `cards` does not have 52 elements (should only be used on a "full" deck).
Used to reshuffle a deck of cards panics if the ` cards ` does not have 52 elements ( should only be used on a " full " deck ) .
cards
&mut Vec<Card>
cards
&mut Vec<Card>