Add TT lookups in quiescence, move TT inside Game, remove redundant occupancy and time limit functions

This commit is contained in:
stefiosif
2025-01-18 13:01:06 +02:00
parent e9729cf95d
commit 824f8a37b5
9 changed files with 70 additions and 119 deletions

View File

@@ -1,6 +1,7 @@
use crate::{
board::fen::from_fen,
movegen::r#move::{Move, MoveType},
search::{transposition_table::TranspositionTable, MAX_TT_SIZE},
};
use String as FenError;
@@ -27,15 +28,17 @@ pub struct Game {
pub history: History,
pub mailbox: Mailbox,
pub hash: ZobristHash,
pub tt: TranspositionTable,
}
impl Game {
pub fn new() -> Self {
Self {
board: Board::new(),
board: Board::startpos(),
history: History::new(),
mailbox: Mailbox::from_board(&Board::new()),
hash: zobrist_keys().calculate_hash(&Board::new()),
mailbox: Mailbox::from_board(&Board::startpos()),
hash: zobrist_keys().calculate_hash(&Board::startpos()),
tt: TranspositionTable::new(MAX_TT_SIZE),
}
}