Islands.Tally (Islands Tally v0.1.12) View Source

Creates a tally struct for the Game of Islands.

Inspired by the book Functional Web Development by Lance Halvorsen.
Also inspired by the course Elixir for Programmers by Dave Thomas.

Link to this section Summary

Link to this section Types

Specs

t() :: %Islands.Tally{
  board: Islands.Board.t(),
  board_score: Islands.Score.t(),
  game_state: Islands.State.game_state(),
  guesses: Islands.Guesses.t(),
  guesses_score: Islands.Score.t(),
  player1_state: Islands.State.player_state(),
  player2_state: Islands.State.player_state(),
  request: Islands.Request.t(),
  response: Islands.Response.t()
}

Link to this section Functions

Specs

new(Islands.Game.t(), Islands.PlayerID.t()) :: t() | {:error, atom()}