Remove duplications and rewrite fn make_move

This commit is contained in:
stefiosif
2024-08-09 23:54:53 +03:00
parent 1988a7e309
commit bac5c33e3f
8 changed files with 153 additions and 190 deletions

View File

@@ -101,7 +101,7 @@ pub fn uci_position(mut position: SplitWhitespace) -> Result<Game, String> {
for mv_str in position {
let mv = Move::parse_from_str(mv_str)?;
game.board.make_move(mv, game.board.state.next_turn());
game.board.make_move(&mv, game.board.state.next_turn());
}
Ok(game)