diff options
author | eug-vs <eugene@eug-vs.xyz> | 2023-01-31 19:48:48 +0300 |
---|---|---|
committer | eug-vs <eugene@eug-vs.xyz> | 2023-01-31 19:48:48 +0300 |
commit | fd0d63aa8fafc6cb46699d75604c329427d158a9 (patch) | |
tree | 102b13ca3fada723511d7ea37070372ec5704e0b /src/board | |
parent | c7272893c271258456d9556a6b59ea6ef1ab5225 (diff) | |
download | chessnost-fd0d63aa8fafc6cb46699d75604c329427d158a9.tar.gz |
fix: correclty index piece-square tables
Diffstat (limited to 'src/board')
-rw-r--r-- | src/board/engine.rs | 4 |
1 files changed, 2 insertions, 2 deletions
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, } ] }); |