mirror of
https://github.com/Noratrieb/minmax.git
synced 2026-01-14 23:35:04 +01:00
player
This commit is contained in:
commit
2fa7531824
8 changed files with 352 additions and 0 deletions
13
src/main.rs
Normal file
13
src/main.rs
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
use minmax::{Board, GreedyPlayer};
|
||||
|
||||
fn main() {
|
||||
let mut board = Board::empty();
|
||||
let result = board.play(&mut GreedyPlayer, &mut GreedyPlayer);
|
||||
println!("{board}");
|
||||
match result {
|
||||
Some(winner) => {
|
||||
println!("player {winner} won!");
|
||||
}
|
||||
None => println!("a draw..."),
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue