View Source Islands.Player (Islands Player v0.1.35)
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.
Summary
Functions
Creates a player struct from name
, gender
and pid
.
Types
@type gender() :: :f | :m
Player's gender
@type name() :: String.t()
Player's name
@type 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