Skip to contents

Total card points in a set of cards

Usage

sk_count_points(cards, call = rlang::caller_env())

Arguments

cards

An sk_card object or character vector.

call

The calling environment, used for error reporting.

Value

A single integer: the sum of the card points. Zero for no cards.

See also

sk_points() for the per-card values.

Other play functions: sk_legal_moves(), sk_trick_winner()

Examples

sk_count_points(c("CA", "D10", "HK"))
#> [1] 25
sk_count_points(sk_full_deck())
#> [1] 120