Crates.io | lib_treblecross |
lib.rs | lib_treblecross |
version | 0.2.1 |
source | src |
created_at | 2022-07-27 16:19:41.061277 |
updated_at | 2022-08-14 15:56:35.434838 |
description | Treblecross solver library using negamax |
homepage | |
repository | |
max_upload_size | |
id | 633986 |
size | 6,999 |
Easily solve any treblecross puzzle.
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
}