From fd0d63aa8fafc6cb46699d75604c329427d158a9 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 31 Jan 2023 19:48:48 +0300 Subject: fix: correclty index piece-square tables --- src/board/engine.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/board/engine.rs b/src/board/engine.rs index e27b004..8521082 100644 --- a/src/board/engine.rs +++ b/src/board/engine.rs @@ -168,8 +168,8 @@ impl Board { material += serialize_bitboard(*bitboard).iter().fold(0., |acc, square| { acc + piece_type.static_eval() + bonus_table[ match color { - Color::White => *square as usize, - Color::Black => square.mirror() as usize, + Color::White => square.mirror() as usize, + Color::Black => *square as usize, } ] }); -- cgit v1.2.3