This module solves the problem of generating and storing the Map data. We are using Elm dictionary as the Map storage engine with Hex coordinate tuple as the key.
See http://www.redblobgames.com/grids/hexagons/implementation.html for reference.
Dict Hash Hexagons.Hex.Hex
Dictionary storage to keep map of hexes
( Basics.Int, Basics.Int, Basics.Int )
Hash key to access Map cell
hashHex : Hexagons.Hex.Hex -> ( Basics.Int, Basics.Int, Basics.Int )
Hash function to get a uniform token to address stored hex Hex
getHex : Hexagons.Hex.Hex -> Map -> Hash -> Hexagons.Hex.Hex
Fetch hex from map storage, using a default value in case of missing Hex
rectangularPointyTopMap : Basics.Int -> Basics.Int -> Map
Generate Map of rectangular shape given its height and width
rectangularFlatTopMap : Basics.Int -> Basics.Int -> Map
Generate Map of rectangular shape given its height and width