Module binoxxo::bruteforce

source ·
Expand description

This module implements a brute force random puzzle creator for binoxxo. See submodules for details.

Re-exports

pub use self::build_board::create_full_board;
pub use self::build_board::create_puzzle_board;

Modules

Implements a recursive brute force puzzle generator. First it generates a random and valid binoxxo board. Then it takes fields away again (by setting them to Empty) and returns the resulting incomplete board as puzzle. Because the board was constructed from a valid board, there exists at least one valid solution for the board.
This module implements selecting a move from a list of given moves with fn select_next_move. The selected move is represented as struct Move.
This module contains the code to determine the options for any empty field of a board: fn calc_possible_moves.
This module can check entiere boards or single moves, whether the fullfill the binoxxo rules.