fix pruning bug, (increase in workset :()
This commit is contained in:
parent
19dd0d3b2c
commit
410e2f3bea
|
@ -486,7 +486,7 @@ impl Game {
|
|||
},
|
||||
GameMove(1..=9, _, _) => {
|
||||
let board = &mut self.boards[self.player];
|
||||
if game_move.0 > self.factories.len() - 1 {
|
||||
if game_move.0 > self.factories.len() {
|
||||
return Err("That factory is out of bounds");
|
||||
}
|
||||
|
||||
|
|
|
@ -27,6 +27,11 @@ fn main() -> Result<(), &'static str> {
|
|||
game.do_move(GameMove(4, Tile::Blue, 2))?;
|
||||
game.do_move(GameMove(0, Tile::Black, 4))?;
|
||||
|
||||
game.do_move(GameMove(5, Tile::Black, 1))?;
|
||||
game.do_move(GameMove(0, Tile::Blue, 3))?;
|
||||
|
||||
println!("{:#?}", game);
|
||||
|
||||
println!("{}", count_options(game, 1, 2));
|
||||
|
||||
Ok(())
|
||||
|
|
Loading…
Reference in New Issue