Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
primenumber committed Nov 6, 2023
1 parent 053137e commit 475888f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/engine/last_cache/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ use super::*;

use rand::{Rng, SeedableRng};

fn solve_last_naive(board: Board) -> i8 {
fn solve_last_naive(board: Board) -> (i8, usize) {
let pos = board.empty().tzcnt() as usize;
match board.play(pos) {
Ok(next) => -next.score(),
Ok(next) => (-next.score(), 1),
Err(_) => match board.pass_unchecked().play(pos) {
Ok(next) => next.score(),
Err(_) => board.score(),
Ok(next) => (next.score(), 2),
Err(_) => (board.score(), 0),
},
}
}
Expand Down

0 comments on commit 475888f

Please sign in to comment.