Implement redundant mailbox representation
This commit is contained in:
@@ -25,9 +25,13 @@ pub fn from_fen(fen: &str) -> Result<Game, FenError> {
|
||||
halfmove_clock,
|
||||
fullmove_counter,
|
||||
));
|
||||
|
||||
let mailbox = Mailbox::new_from_board(&board);
|
||||
|
||||
Ok(Game {
|
||||
board,
|
||||
history: History::new(),
|
||||
mailbox,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -127,6 +131,7 @@ fn castling_ability(castling: &str) -> Result<[Castle; 2], FenError> {
|
||||
use std::collections::HashMap;
|
||||
|
||||
use super::history::History;
|
||||
use super::mailbox::Mailbox;
|
||||
|
||||
fn en_passant_square(square: &str) -> Result<Option<usize>, FenError> {
|
||||
let mut sqr = square.chars();
|
||||
|
||||
Reference in New Issue
Block a user