Islands.Client.IslandType (Islands Client Island Type v0.1.15) View Source

Converts island type codes into island types in the Game of Islands.

Link to this section Summary

Types

Island type code e.g. "a" or "d"

t()

Island type

Functions

Converts island_type_code into an island type.

Link to this section Types

Specs

code() :: <<_::8>>

Island type code e.g. "a" or "d"

Specs

Island type

Link to this section Functions

Specs

new(code()) :: t() | {:error, atom()}

Converts island_type_code into an island type.

Examples

iex> alias Islands.Client.IslandType
iex> IslandType.new("a")
:atoll