pub fn multi_deck(n_decks: u8, n_jokers: u8, rng: &mut ThreadRng) -> Sequence {
        
        let mut deck = Sequence::new();

        for _i in 0..n_decks {

            // add the regular cards
            for val in 1..=MAX_VAL {
                for suit in &[Heart, Diamond, Club, Spade] {
                    deck.add_card(RegularCard(*suit, val));
                }
            }
        }
            
        // add the jokers
        for _j in 0..n_jokers {
            deck.add_card(Joker);
        }

        // shuffle the deck
        deck.shuffle(rng);

        deck
    }
/// Build a randomly-shuffled deck of cards
///
/// # Arguments
///
/// * `n_decks`: the number of copies of a full deck of 52 cards
/// * `n_jokers`: the number of jokers
/// * `rng`: mutable reference to the random-number generator used foor shuffling
///
/// # Example
///
/// ```
/// use rand::thread_rng;
/// use machiavelli::sequence_cards::Sequence;
///
/// let mut rng = thread_rng();
/// let sequence = Sequence::multi_deck(3, 6, &mut rng);
///
/// assert_eq!(162, sequence.number_cards());
/// ```
Build a randomly-shuffled deck of cards
Build a randomly - shuffled deck of cards
pub fn multi_deck(n_decks: u8, n_jokers: u8, rng: &mut ThreadRng) -> Sequence {
        let mut deck = Sequence::new();
        for _i in 0..n_decks {
            // add the regular cards
            for val in 1..=MAX_VAL {
                for suit in &[Heart, Diamond, Club, Spade] {
                    deck.add_card(RegularCard(*suit, val));
                }
            }
        }
        // add the jokers
        for _j in 0..n_jokers {
            deck.add_card(Joker);
        }
        // shuffle the deck
        deck.shuffle(rng);
        deck
    }
pub fn multi_deck ( n_decks : u8 , n_jokers : u8 , rng : & mut ThreadRng ) -> Sequence { let mut deck = Sequence :: new ( ) ; for _i in 0 .. n_decks { // add the regular cards for val in 1 ..= MAX_VAL { for suit in & [ Heart , Diamond , Club , Spade ] { deck . add_card ( RegularCard ( * suit , val ) ) ; } } } // add the jokers for _j in 0 .. n_jokers { deck . add_card ( Joker ) ; } // shuffle the deck deck . shuffle ( rng ) ; deck }
Build a randomly-shuffled deck of cards
Build a randomly - shuffled deck of cards
n_decks
u8
n_jokers
u8
rng
&mut ThreadRng
n_decks
u8
n_jokers
u8
rng
&mut ThreadRng
example
```
use rand::thread_rng;
use machiavelli::sequence_cards::Sequence.

let mut rng = thread_rng();
let sequence = Sequence::multi_deck(3, 6, &mut rng).


` ` ` use rand :: thread_rng ; use machiavelli :: sequence_cards :: Sequence . let mut rng = thread_rng () ; let sequence = Sequence :: multi_deck ( 3 6 &mut rng ) .