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

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

Summary

Types

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

t()

Island type

Functions

Converts island_type_code into an island type.

Types

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

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

@type t() :: Islands.Island.type()

Island type

Functions

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

Converts island_type_code into an island type.

Examples

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