View Source Briscola.Card (Briscola v0.1.1)

Struct for a card in the game of Briscola. https://en.m.wikipedia.org/wiki/Italian_playing_cards

Summary

Types

Possible ranks for a card in a stripped Italian deck.

The suit of a card.

t()

Functions

Returns the point value of a card

Returns the strength of a card, used to determine a trick winner.

Types

rank()

@type rank() :: 1..10

Possible ranks for a card in a stripped Italian deck.

suit()

@type suit() :: :cups | :coins | :swords | :batons

The suit of a card.

t()

@type t() :: %Briscola.Card{rank: rank(), suit: suit()}

Functions

score(card)

@spec score(t()) :: integer()

Returns the point value of a card

strength(card)

Returns the strength of a card, used to determine a trick winner.