Crate nimlib

source ·
Expand description

NimLib

A Rust library for Nim games: calculate nimbers and possible moves

NimLib is work-in-progress at the moment.
Features such as Poker-Nim (coin pools) are not yet implemented,
and the move generation algorithm is not yet ported to this library.

Modules

The inner workings of the nimber calculation algorithms;
also contains clear_nimber_cache, which you may need to call yourself (see clear_nimber_cache)

Structs

A Nim game
A rule for a Nim game.
This struct specifies a set of possible moves for a player.
Represents a stack of coins; specifically its height.
Simply wraps a u64.

Enums

Specifies if a player may/must split a stack into two non-empty stacks after taking coins
Specifies the number of coins that can be taken from a stack in a single move according to a rule.