[−][src]Module hex_game::board
A struct describing a Hex board of a given size. For information about hex grids in computers, look at the excellent Red Blob Games guide on the subject.
Under the hood, this uses a union-find structure to keep track of the game status efficiently, and stores pieces in sets.
Structs
Board | A Hex board of a given size, with pieces placed. The maximum size is 26, due to the limitations of the standard Hex coordinate system. |
Enums
Color | One of the two possible colors in Hex. |
GameStatus | A simple descriptor of the game status: ongoing, black victory, or white victory. |
HexCell | A simple descriptor of the possible values at a Hex tile: black piece, white piece, or empty. |