lib_treblecross

Crates.iolib_treblecross
lib.rslib_treblecross
version0.2.1
sourcesrc
created_at2022-07-27 16:19:41.061277
updated_at2022-08-14 15:56:35.434838
descriptionTreblecross solver library using negamax
homepage
repository
max_upload_size
id633986
size6,999
Tristan F. (LeoDog896)

documentation

README

treblecross-solver

Easily solve any treblecross puzzle.

Usage

use lib_treblecross::{solve, solve_and_collect, Game};

fn main() {
    let mut game = Game::new(5);

    let result = solve_and_collect(&mut game); // [-1.5, -1.5, 2, -1.5, -1.5]

    game.play(0);
    game.play(1);

    let winning_move = game.is_winning_move(2); // true

    game.play(2);

    let game_over = game.game_over(); // true
}
Commit count: 0

cargo fmt