aboutsummaryrefslogtreecommitdiff
path: root/src/board/engine.rs
diff options
context:
space:
mode:
authoreug-vs <eugene@eug-vs.xyz>2023-02-21 12:15:35 +0300
committereug-vs <eugene@eug-vs.xyz>2023-02-21 12:15:35 +0300
commit8cd12afe8d057e9f80c50727dea00b40256bca54 (patch)
treeb522754bb18610ca7511e07eebe7b81af2830ee2 /src/board/engine.rs
parent27c08580d7ae61ea86a3c0bfbb62c5930ec010ac (diff)
downloadchessnost-8cd12afe8d057e9f80c50727dea00b40256bca54.tar.gz
refactor: rename board.pieces -> piece_sets
Diffstat (limited to 'src/board/engine.rs')
-rw-r--r--src/board/engine.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/board/engine.rs b/src/board/engine.rs
index d58e529..c98348e 100644
--- a/src/board/engine.rs
+++ b/src/board/engine.rs
@@ -189,8 +189,8 @@ impl Board {
let mut result = 0.0;
let pawns = match color {
- Color::White => self.pieces[PieceType::Pawn as usize],
- Color::Black => self.pieces[PieceType::PawnBlack as usize],
+ Color::White => self.piece_sets[PieceType::Pawn as usize],
+ Color::Black => self.piece_sets[PieceType::PawnBlack as usize],
};
for file in 0..8 {
@@ -225,8 +225,8 @@ impl Board {
let mut result = 0.0;
let king_square = match color {
- Color::White => self.pieces[PieceType::King as usize],
- Color::Black => self.pieces[PieceType::KingBlack as usize],
+ Color::White => self.piece_sets[PieceType::King as usize],
+ Color::Black => self.piece_sets[PieceType::KingBlack as usize],
}.bitscan();
for (piece_type, bitboard) in self.pieces_by_color(color.flip()).iter().enumerate() {