Deal a Hand of Blackjack Cards
deal_hand.Rd
Randomly selects a specified number of cards from a given deck. This function is typically used to deal the initial hand to a player or the dealer in a round of Blackjack.
Details
This function samples cards from a shuffled card
vector. It does not remove dealt cards
from the original deck — if needed, you can manage deck state manually using indexing.
Examples
deck <- deck_cards()
hand <- deal_hand(deck$cards, 2)
print(hand)
#> <card[2]>
#> [1] 9♦ 10♥