hexgrid v2.1.1 HexGrid.Map
Map for Hexes. Allows for adding/removing tiles and setting data on them.
Link to this section Summary
Functions
Gets the value from the map
Adds the tile to the map
Creates an empty map
Creates a Hexagonal-shaped map with a given radius
Sets the arbitrary value on a map
Link to this section Types
Result returned from Map functions
Map
Link to this section Functions
Gets the value from the map.
Adds the tile to the map
Creates an empty map
Examples:
iex> HexGrid.Map.new() {:ok, %HexGrid.Map{}}
Creates a Hexagonal-shaped map with a given radius
Examples:
iex> HexGrid.Map.new_hex(0) {:ok, %HexGrid.Map{data: %{%HexGrid.Hex{q: 0, r: 0, s: 0} => %{}}}}
Sets the arbitrary value on a map.