Hex Grid
A library to easily work with 2d hex grids of arbitrary shapes
Usage
Add this to your Cargo.toml
:
[]
= "*"
and this to your crate root:
extern crate hex_grid;
Quick Start
use *;
use HashMap;
//empty grid
let mut grid: = new;
//fill the grid with tiles in a hexagon shape of size 3
let coords = CENTER + fill_hex;
for coord in coords
//get the tile that is to the right 2 tiles from the center tile
let tile: = grid.get;