View Source Islands.Player (Islands Player v0.1.28)
Creates a player struct for the Game of Islands.
The player struct contains the fields name, gender, pid, board and
guesses representing the characteristics of a player in the Game of Islands.
Based on the book Functional Web Development by Lance Halvorsen.
Link to this section Summary
Functions
Creates a player struct from name, gender and pid.
Link to this section Types
Specs
gender() :: :f | :m
Player's gender
Specs
name() :: String.t()
Player's name
Specs
t() :: %Islands.Player{
board: Islands.Board.t(),
gender: gender(),
guesses: Islands.Guesses.t(),
name: name(),
pid: pid() | nil
}
A player struct for the Game of Islands