Move make/unmake and History on Game
This commit is contained in:
@@ -25,7 +25,10 @@ pub fn from_fen(fen: &str) -> Result<Game, FenError> {
|
||||
halfmove_clock,
|
||||
fullmove_counter,
|
||||
));
|
||||
Ok(Game { board })
|
||||
Ok(Game {
|
||||
board,
|
||||
history: History::new(),
|
||||
})
|
||||
}
|
||||
|
||||
pub fn piece_placement(pieces: &str) -> Result<Board, FenError> {
|
||||
@@ -123,6 +126,8 @@ fn castling_ability(castling: &str) -> Result<[Castle; 2], FenError> {
|
||||
|
||||
use std::collections::HashMap;
|
||||
|
||||
use super::history::History;
|
||||
|
||||
fn en_passant_square(square: &str) -> Result<Option<usize>, FenError> {
|
||||
let mut sqr = square.chars();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user