Islands.Game (Islands Game v0.1.20) View Source
Models a game
in the Game of Islands.
Based on the book Functional Web Development by Lance Halvorsen.
Link to this section Summary
Functions
Callback implementation for Access.fetch/2
.
Callback implementation for Access.get_and_update/3
.
Callback implementation for Access.pop/2
.
Link to this section Types
Specs
name() :: String.t()
Specs
t() :: %Islands.Game{ name: name(), player1: Islands.Player.t(), player2: Islands.Player.t(), request: Islands.Request.t(), response: Islands.Response.t(), state: Islands.State.t() }
Link to this section Functions
Callback implementation for Access.fetch/2
.
Callback implementation for Access.get_and_update/3
.
Specs
Specs
notify_player(t(), Islands.PlayerID.t()) :: t()
Specs
opponent_id(Islands.PlayerID.t()) :: Islands.PlayerID.t()
Specs
player_board(t(), Islands.PlayerID.t()) :: Islands.Board.t()
Callback implementation for Access.pop/2
.
Specs
update_board(t(), Islands.PlayerID.t(), Islands.Board.t()) :: t()
Specs
update_guesses( t(), Islands.PlayerID.t(), Islands.Guesses.type(), Islands.Coord.t() ) :: t()
Specs
update_player( t(), Islands.PlayerID.t(), Islands.Player.name(), Islands.Player.gender(), pid() ) :: t()
Specs
update_request(t(), Islands.Request.t()) :: t()
Specs
update_response(t(), Islands.Response.t()) :: t()
Specs
update_state(t(), Islands.State.t()) :: t()