Deck Shuffling
Implemented a deck shuffling algorithm. It will iterate over the deck of cards 1000 times and swap the card it is on with another random card to mix up the deck. Reviewed-on: #12
This commit was merged in pull request #12.
This commit is contained in:
@@ -5,6 +5,7 @@ fn check_num_decks() {
|
||||
let mut num_card: [u64; 52] = [0; 52];
|
||||
let num_decks = 8;
|
||||
let mut deck = Deck::new(num_decks as u64);
|
||||
deck.shuffle();
|
||||
|
||||
for _ in 0..deck.deck_size() {
|
||||
let next_card = deck.get_next_card();
|
||||
|
||||
Reference in New Issue
Block a user