View Source Islands.Grid.Tile (Islands Grid v0.1.38)
Creates a tile from a cell value.
Summary
Functions
Creates a tile (with embedded ANSI escapes) from cell_value
.
Functions
@spec new(atom()) :: IO.chardata()
Creates a tile (with embedded ANSI escapes) from cell_value
.
Examples
iex> alias Islands.Grid.Tile
iex> Tile.new(:atoll) # => A sandy brown tile
[[[[[] | "[38;5;215m"] | "[48;5;215m"], "<a>"] | "[0m"]
iex> alias Islands.Grid.Tile
iex> Tile.new(:atoll_hit) # => An islamic green tile
[[[[[] | "[38;5;34m"] | "[48;5;34m"], ">a<"] | "[0m"]