[board] Define two new types for the Clock properties of Board

Helpful for other parts of the code.
This commit is contained in:
Eryn Wells 2025-05-23 09:53:29 -07:00
parent d5c0330fbe
commit ddd14e8999
2 changed files with 7 additions and 3 deletions

View file

@ -9,14 +9,17 @@ use crate::{
use chessfriend_bitboard::BitBoard;
use chessfriend_core::{Color, Piece, Shape, Square, Wing};
pub type HalfMoveClock = u32;
pub type FullMoveClock = u32;
#[derive(Clone, Debug, Default, Eq, PartialEq)]
pub struct Board {
pub active_color: Color,
pub pieces: PieceSet,
pub castling_rights: castle::Rights,
pub en_passant_target: Option<Square>,
pub half_move_clock: u32,
pub full_move_number: u32,
pub half_move_clock: HalfMoveClock,
pub full_move_number: FullMoveClock,
}
impl Board {