Expand description
A graph library for board games
When writing programs revolving around tabletop board games, often the graph is the preferred data structure for representing the game board, especially in games that are neither linear nor grid-based, i.e. Risk. This crate provides utilities for building and interacting with graph-based board states.
More specifically, we provide Board, a HashMap based graph with configurable labels and options. With it we provide Node, representing a location on the board, with connections to other Nodes. Finally, we provide an io package to facilitate loading and saving these boards, and a related image to a compressed file.
Modules§
- io
- Module to allow reading and writing to zipped board files
Structs§
- Board
- A graph of Nodes and related information
- Config
- Configuration options for a Board
- Node
- A space or connection on a Board
Traits§
- Coord
Transformer - Trait to allow transformations from the ([0,1], [0,1]) coordinate space of the graph to another coordinate space