summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMicha White <botahamec@outlook.com>2023-12-21 16:33:09 -0500
committerMicha White <botahamec@outlook.com>2023-12-21 16:33:09 -0500
commit207bafde1fa2468d666c7ac894eebee1cf95bed2 (patch)
tree454dcd095a5ad0d5230799055da92bb35e43db3d /ui
parente4be2bdb76842e34503c2a408ab7cffdc30d4ec2 (diff)
Engine API
Diffstat (limited to 'ui')
-rw-r--r--ui/src/main.rs14
1 files changed, 4 insertions, 10 deletions
diff --git a/ui/src/main.rs b/ui/src/main.rs
index 43191e5..7ce364e 100644
--- a/ui/src/main.rs
+++ b/ui/src/main.rs
@@ -82,11 +82,8 @@ impl State for GameState {
// safety: this was determined to be in the list of possible moves
self.bit_board = unsafe { selected_move.apply_to(self.bit_board) };
- let evaluation = engine::current_evaluation(
- 7,
- self.bit_board,
- self.transposition_table.mut_ref(),
- );
+ let evaluation =
+ engine::evaluate(7, self.bit_board, self.transposition_table.mut_ref());
println!("AI advantage: {}", evaluation);
// ai makes a move
@@ -103,11 +100,8 @@ impl State for GameState {
self.selected_square = None;
self.possible_moves.clear();
- let evaluation = engine::current_evaluation(
- 7,
- self.bit_board,
- self.transposition_table.mut_ref(),
- );
+ let evaluation =
+ engine::evaluate(7, self.bit_board, self.transposition_table.mut_ref());
println!("Your advantage: {}", evaluation);
} else {
self.selected_square = Some(square);