Skip to contents

Positions each card in the trick-taking order returned by sk_card_order(), so strengths can be compared directly: higher beats lower.

Usage

sk_strength(x, game_type, call = rlang::caller_env())

Arguments

x

An sk_card object or character vector of card codes.

game_type

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

call

The calling environment, used for error reporting.

Value

An integer vector of strengths in 1:32 (higher beats lower), the same length as x.

See also

sk_card_order() for the underlying order.

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

Examples

sk_strength(c("CJ", "DA", "H7"), "grand")
#> [1] 32 28 15