1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
use crate::*;

/// Castling rights.
#[derive(Debug, Clone, Copy, PartialEq, Eq, Hash)]
pub struct CastleRights {
    /// The rook file for short castling.
    pub short: Option<File>,
    /// The rook file for long castling.
    pub long: Option<File>
}

impl CastleRights {
    /// Empty [`CastleRights`].
    /// # Examples
    /// ```
    /// # use cozy_chess_types::*;
    /// assert_eq!(CastleRights::EMPTY, CastleRights {
    ///    short: None,
    ///    long: None
    /// });
    /// ```
    pub const EMPTY: CastleRights = CastleRights {
        short: None,
        long: None
    };
}