Skip to main content

Crate endgame_grid

Crate endgame_grid 

Source

Modules§

dynamic
This crate provides a “dynamic” coordinate that dispatches to one of the other concrete coordinate types. This is useful when implementing code that is not only generic in the coordinate system, but must be able to switch between them at runtime.
hex
shape
square
triangle

Enums§

Color
Color assignment values for grid coordinates. The four color theorem proves that for any loopless planar graph no more colors are needed to color adjacent nodes so that no two adjacent nodes have the same color.
So as long as the coordinate system is isomorphic to a loopless planar graph, we can use just four colors provide a suitable coloring for a grid.
Should this library expand beyond such coordinate systems, this design choice will need to be revisited.
DirectionType
A flag that can be used to indicate whether we are referencing directions for the face or a vertex of a grid cell.

Traits§

AllowedCoordIterRange
AllowedCoordIterRange is a helper trait to constrain the type of RangeBounds we want to allow for CoordIter.
Coord
An abstract representation of coordinates in a grid system.
ModuleCoord
A trait for those coordinate systems that satisfy the properties of being an algebraic module. While not strictly required by the Coord trait, the focus of this crate is on discrete grid systems. As such, they will not satisfy the properties of a vector or linear space, because their scalar multiplication is not defined for a field.
ModuleShape
As specialization of Shape for those coordinate systems that satisfy ModuleCoord and thus support translation.
ModuleShapeContainer
As specialization of ShapeContainer for those coordinate systems that satisfy ModuleCoord and thus support translation.
Shape
An abstraction for representing finite portions of an infinite grid plane.
ShapeContainer
An abstraction for associating values with coordinates in a finite portion of an infinite grid plane.
ShapeContainerIterator
A trait for iterators over coordinates and their values in a ShapeContainer.
ShapeIterator
A trait for iterators over coordinates in a Shape.
SizedGrid
Extend abstract grid coordinates with a specific cell size.