From 8cd12afe8d057e9f80c50727dea00b40256bca54 Mon Sep 17 00:00:00 2001 From: eug-vs Date: Tue, 21 Feb 2023 12:15:35 +0300 Subject: refactor: rename board.pieces -> piece_sets --- src/board/engine.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/board/engine.rs') 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() { -- cgit v1.2.3