Islands Player v0.1.8 Islands.Player 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

Link to this type

gender()

View Source
gender() :: :f | :m
Link to this type

t()

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

Link to this section Functions

Link to this function

new(name, gender, pid)

View Source
new(String.t(), gender(), pid() | nil) :: t() | {:error, atom()}