Expand description

Positioning

This is a library to encapsulate some code I’ve found myself repeating recently around game coordinates. The particularly useful thing to abstract out is pathfinding, as that’s quite intricate to implement from scratch every time I need it.

Modules

Contains an implementation of an iterator which returns positions out from a given start in breadth first order.

Contains an implementation of A* and all-pairs-shortest paths with fun a twist where the latter performs well as a heuristic in a specific context.

Structs

Represents a position in a 3D grid, bounded in each dimension by the maximum size of an i64. Around the bounds, all arithmetic in this module with be done in a wrapping way, so be aware of that in your usage of this module.