Islands.Player (Islands Player v0.1.22) View Source

Creates a player struct for the Game of Islands.

Based on the book Functional Web Development by Lance Halvorsen.

Link to this section Summary

Link to this section Types

Specs

gender() :: :f | :m

Specs

name() :: String.t()

Specs

t() :: %Islands.Player{
  board: Islands.Board.t() | nil,
  gender: gender(),
  guesses: Islands.Guesses.t() | nil,
  name: name(),
  pid: pid() | nil
}

Link to this section Functions

Link to this function

new(name, gender, pid, options \\ [])

View Source

Specs

new(name(), gender(), pid() | nil, Keyword.t()) :: t() | {:error, atom()}