pub struct PieceSquareTable { /* private fields */ }Expand description
PieceSquareTable gives scores for pieces on squares from the perspective of white. See https://www.chessprogramming.org/Piece-Square_Tables
Implementations§
Source§impl PieceSquareTable
impl PieceSquareTable
Sourcepub fn new(piece_square_values: [[i16; 64]; 6]) -> PieceSquareTable
pub fn new(piece_square_values: [[i16; 64]; 6]) -> PieceSquareTable
piece_square_values should encode positional and material value of piece on each square. eg if pawn is worth +100 material value and pawn on D4 is worth +20 as positional value, entry for pawn on D4 should equal 100 + 20 = +120.
pub fn castle_score(&self, castle: Castle) -> i16
Trait Implementations§
Source§impl Clone for PieceSquareTable
impl Clone for PieceSquareTable
Source§fn clone(&self) -> PieceSquareTable
fn clone(&self) -> PieceSquareTable
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PieceSquareTable
impl RefUnwindSafe for PieceSquareTable
impl Send for PieceSquareTable
impl Sync for PieceSquareTable
impl Unpin for PieceSquareTable
impl UnwindSafe for PieceSquareTable
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more