Islands Board v0.1.1 Islands.Board View Source
Models a board
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
islands()
View Source
islands()
View Source
islands() :: %{optional(Islands.Island.type()) => Islands.Island.t()}
islands() :: %{optional(Islands.Island.type()) => Islands.Island.t()}
Link to this type
t()
View Source
t()
View Source
t() :: %Islands.Board{islands: islands(), misses: Islands.Island.coords()}
t() :: %Islands.Board{islands: islands(), misses: Islands.Island.coords()}
Link to this section Functions
Link to this function
all_islands_positioned?(board) View Source
Link to this function
guess(board, guess)
View Source
guess(board, guess)
View Source
guess(t(), Islands.Coord.t()) :: Islands.Board.Response.t()
guess(t(), Islands.Coord.t()) :: Islands.Board.Response.t()
Link to this function
new()
View Source
new()
View Source
new() :: t()
new() :: t()
Link to this function
position_island(board, island)
View Source
position_island(board, island)
View Source
position_island(t(), Islands.Island.t()) :: t() | {:error, atom()}
position_island(t(), Islands.Island.t()) :: t() | {:error, atom()}