Module moves

Source
Expand description

Code for handling moves.
This module contains code for handling moves in Nim games, such as calculating the resulting position after a move is applied, determining if a move is valid, and generating all possible moves for a given position.

Enums§

MoveError
Errors which may occur when applying a move

Functions§

apply_move
Applies a move to a position, if the move is valid
apply_move_unchecked
Applies a move to a position, even if the move is invalid
calculate_legal_moves
Generate all possible (legal) moves for a given position
check_move
Determine if a move is valid for a given position