Skip to contents

Returns every card in strict ascending trick-taking strength for the given game type. The last element is the strongest card.

Usage

sk_card_order(game_type, call = rlang::caller_env())

Arguments

game_type

A single game-type string, one of sk_game_types().

call

The calling environment, used for error reporting.

Value

A character vector of all 32 card codes ordered from weakest to strongest for the given game type.

See also

sk_strength() to look a card up in this order.

Other game-type functions: sk_effective_suit(), sk_game_types(), sk_is_trump(), sk_strength()

Examples

# The jack of clubs is the strongest card of every suit and grand game.
tail(sk_card_order("grand"), 4)
#> [1] "DJ" "HJ" "SJ" "CJ"
tail(sk_card_order("hearts"), 4)
#> [1] "DJ" "HJ" "SJ" "CJ"
# Null games have no trumps at all.
head(sk_card_order("null"), 8)
#> [1] "C7"  "C8"  "C9"  "C10" "CJ"  "CQ"  "CK"  "CA"