Move MoveParameter handling inside make/unmake_move
This commit is contained in:
@@ -3,7 +3,15 @@ use String as FenError;
|
||||
|
||||
use super::board::{Board, Color};
|
||||
|
||||
#[derive(Debug, PartialEq, Eq)]
|
||||
impl PartialEq for Game {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.board.white_pieces == other.board.white_pieces
|
||||
&& self.board.black_pieces == other.board.black_pieces
|
||||
&& self.board.state == other.board.state
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug, Eq)]
|
||||
pub struct Game {
|
||||
pub board: Board,
|
||||
}
|
||||
@@ -19,10 +27,6 @@ impl Game {
|
||||
from_fen(fen)
|
||||
}
|
||||
|
||||
pub const fn run() {
|
||||
Board::new();
|
||||
}
|
||||
|
||||
pub const fn current_player(&self) -> Color {
|
||||
self.board.state.current_player()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user