Implement PeSTO eval

This commit is contained in:
stefiosif
2025-01-12 23:02:10 +02:00
parent 365bd71a6f
commit 2c9181993f
7 changed files with 279 additions and 270 deletions

View File

@@ -204,6 +204,17 @@ impl PieceType {
pub const fn idx(self) -> usize {
self as usize
}
pub const fn score(self) -> i32 {
match self {
Self::Pawn => 100,
Self::Knight => 320,
Self::Bishop => 330,
Self::Rook => 500,
Self::Queen => 900,
Self::King => 20000,
}
}
}
use std::ops::{Index, IndexMut};