diff --git a/core/src/coordinates.rs b/core/src/coordinates.rs index 7e4be53..f40ccb1 100644 --- a/core/src/coordinates.rs +++ b/core/src/coordinates.rs @@ -159,6 +159,15 @@ impl Rank { Rank::SEVEN, Rank::EIGHT, ]; + + /// Ranks on which pawns start, by color. + /// + /// ``` + /// use chessfriend_core::{Color, Rank}; + /// assert_eq!(Rank::PAWN_STARTING_RANKS[Color::White as usize], Rank::TWO); + /// assert_eq!(Rank::PAWN_STARTING_RANKS[Color::Black as usize], Rank::SEVEN); + /// ``` + pub const PAWN_STARTING_RANKS: [Rank; 2] = [Rank::TWO, Rank::SEVEN]; } #[rustfmt::skip]