summaryrefslogtreecommitdiff
path: root/ui
diff options
context:
space:
mode:
authorMike White <botahamec@outlook.com>2021-09-19 19:23:30 -0400
committerMike White <botahamec@outlook.com>2021-09-19 19:23:30 -0400
commit10438fa9ae1dc4624ebb1780238d46d4b5d3f0eb (patch)
tree7648d5088130f8c98cd2338cf158db0ca7e14ce6 /ui
parent9644bb7aeede0635b2544192bef1069c1ad06f7d (diff)
Fixed segmentation fault
Diffstat (limited to 'ui')
-rw-r--r--ui/src/main.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/ui/src/main.rs b/ui/src/main.rs
index c25c0d7..37d1732 100644
--- a/ui/src/main.rs
+++ b/ui/src/main.rs
@@ -77,17 +77,20 @@ 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) };
+ self.evaluation = ai::eval_multithreaded(15, 0.0, 1.0, self.bit_board);
+ println!("{}", self.evaluation);
+
// ai makes a move
while self.bit_board.turn() == PieceColor::Light
&& !PossibleMoves::moves(self.bit_board).is_empty()
{
- let best_move = ai::best_move(12, self.bit_board);
+ let best_move = ai::best_move(15, self.bit_board);
self.bit_board = unsafe { best_move.apply_to(self.bit_board) };
}
self.selected_square = None;
self.possible_moves.clear();
- self.evaluation = ai::eval_multithreaded(12, 0.0, 1.0, self.bit_board);
+ self.evaluation = ai::eval_multithreaded(15, 0.0, 1.0, self.bit_board);
println!("{}", self.evaluation);
} else {
self.selected_square = Some(square);