distance a b returns the minimum number of moves required to get from
a to b, moving between adjacent tiles at each step. (Two tiles are
adjacent if they share an edge.) If a or b are not contained within
g, the result is undefined.

triTriGrid s returns a triangular grid with sides of
length s, using triangular tiles. If s is nonnegative, the resulting
grid will have s^2 tiles. Otherwise, the resulting grid will be empty
and the list of indices will be null.

paraTriGrid r c returns a grid in the shape of a
parallelogram with r rows and c columns, using triangular tiles.
If r and c are both nonnegative, the resulting grid will have 2*r*c
tiles. Otherwise, the resulting grid will be empty and the list of indices
will be null.

Grids with square tiles

rectSquareGrid r c produces a rectangular grid with r rows and c
columns, using square tiles. If r and c are both nonnegative, the
resulting grid will have r*c tiles. Otherwise, the resulting grid will
be empty and the list of indices will be null.

torSquareGrid r c returns a toroidal grid with r
rows and c columns, using square tiles. If r and c are
both nonnegative, the resulting grid will have r*c tiles. Otherwise,
the resulting grid will be empty and the list of indices will be null.

Grids with hexagonal tiles

hexHexGrid s returns a grid of hexagonal shape, with
-- sides of length s, using hexagonal tiles. If s is nonnegative, the
resulting grid will have 3*s*(s-1) + 1 tiles. Otherwise, the resulting
grid will be empty and the list of indices will be null.

paraHexGrid r c returns a grid in the shape of a
parallelogram with r rows and c columns, using hexagonal tiles. If
r and c are both nonnegative, the resulting grid will have r*c tiles.
Otherwise, the resulting grid will be empty and the list of indices will
be null.