Implement PeSTO eval
This commit is contained in:
@@ -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};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user