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.
This commit is contained in:
2026-01-10 20:05:24 -05:00
parent cedef1792f
commit 30c8705485
4 changed files with 160 additions and 1 deletions

View File

@@ -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();