3 unstable releases
0.2.1 | Aug 14, 2022 |
---|---|
0.2.0 | Aug 14, 2022 |
0.1.0 | Jul 27, 2022 |
#523 in Games
23 downloads per month
Used in treblecross
6KB
142 lines
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
}
lib.rs
:
Simple treblecross solver.
Dependencies
~99KB