[][src]Module hex_game::coord

A coordinate system suitable for Hex games. The standard setup is a parallelogram, with letters a-z representing columns from left to right, and numbers 1-26 representing rows from top to bottom. In the most common orientation, the top left corner is farther left than the bottom left corner, and so the longest diagonal runs from the top left to bottom right.

These coordinates are optimized for Hex, a game that is not usually played on boards larger than 26x26. Thus, these coordinates do not work for higher board sizes, as it breaks the string representations and integer arithmetic.

Structs

Coord

A coordinate on a Hex board, such that (x, y) = (0, 0) is the top left and (1, 0) is the hex immediately to the right of that hex. Cannot support boards larger than 128x128 for performance reasons.

Enums

ParseCoordError

An error for parsing a Coord.