improvements

This commit is contained in:
2025-02-18 02:02:50 -05:00
parent 43585802d8
commit cd28790d80
4 changed files with 77 additions and 42 deletions

View File

@@ -264,6 +264,10 @@ impl Board {
.count()
}
pub fn net_score(&self, piece: Piece) -> isize {
self.count(piece) as isize - self.count(!piece) as isize
}
/// Returns (White score, Black score)
pub fn get_score(&self) -> (usize, usize) {
(self.count(Piece::White), self.count(Piece::Black))