Skip to contents

Return a five card hand from a deck of cards, as a data.frame with rank and suit.

Usage

deal_hand_df(d)

Arguments

d

a deck created by new_deck_df().

Value

a data.frame containing 5 random cards.

Details

Uses sample() to select 5 random cards.

Examples

deck <- new_deck_df()
deal_hand_df(deck)
#>    rank suit
#> 47    9    S
#> 52    A    S
#> 31    6    H
#> 4     5    C
#> 38    K    H