Skip to contents

Creates a single card, represented as an S3 object of class sk_card. A card is stored as a length-one character code of the form "<suit><rank>", e.g. "CA" for the ace of clubs or "D10" for the ten of diamonds.

Usage

sk_card(suit, rank, call = rlang::caller_env())

Arguments

suit

A single suit code, one of sk_suits ("C", "S", "H", "D").

rank

A single rank code, one of sk_ranks.

call

The calling environment, used for error reporting.

Value

An sk_card object (a length-one character vector with class sk_card).

Examples

sk_card("C", "A")
#> 1 Skat card: ♣A
sk_card("D", "10")
#> 1 Skat card: ♦10