Create a new MoveRecord struct that tracks the move (aka ply) and irreversible board properties. This should make it easier to unmake moves in the future.
15 lines
389 B
Rust
15 lines
389 B
Rust
// Eryn Wells <eryn@erynwells.me>
|
|
|
|
use chessfriend_board::{board::HalfMoveClock, CastleRights};
|
|
use chessfriend_core::Square;
|
|
use chessfriend_moves::Move;
|
|
|
|
#[derive(Clone, Debug, Eq, PartialEq)]
|
|
pub(crate) struct MoveRecord {
|
|
pub ply: Move,
|
|
pub en_passant_target: Option<Square>,
|
|
pub castling_rights: CastleRights,
|
|
pub half_move_clock: HalfMoveClock,
|
|
}
|
|
|
|
impl MoveRecord {}
|