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
[[[[[] | ""] | ""], "<a>"] | ""]

iex> alias Islands.Grid.Tile
iex> Tile.new(:atoll_hit) # => An islamic green tile
[[[[[] | ""] | ""], ">a<"] | ""]