Islands.Score (Islands Score v0.1.25) View Source
Creates a score
struct for the Game of Islands.
Also formats the score
of a player.
Inspired by the book Functional Web Development by Lance Halvorsen.
Link to this section Summary
Functions
Creates a score
struct from the board of a player.
Formats the score
of a player.
Creates a score
struct from the board of a player's opponent.
Link to this section Types
Specs
t() :: %Islands.Score{ forested_types: [Islands.Island.type()], gender: Islands.Player.gender(), hits: non_neg_integer(), misses: non_neg_integer(), name: Islands.Player.name() }
Link to this section Functions
Specs
board_score(Islands.Game.t(), Islands.PlayerID.t()) :: t()
Creates a score
struct from the board of a player.
Specs
Formats the score
of a player.
Specs
guesses_score(Islands.Game.t(), Islands.PlayerID.t()) :: t()
Creates a score
struct from the board of a player's opponent.