fn color_of_piece_on_square(position: (u8, u8), pieces: &[Piece]) -> Option<PieceColor> {
    match get_piece_on_square(position, pieces) {
        Some(piece) => Some(piece.color),
        None => None,
    }
}
/// Returns the color of the piece at the given position, None otherwise.
Returns the color of the piece at the given position, None otherwise.
Returns the color of the piece at the given position None otherwise .
fn color_of_piece_on_square(position: (u8, u8), pieces: &[Piece]) -> Option<PieceColor> {
    match get_piece_on_square(position, pieces) {
        Some(piece) => Some(piece.color),
        None => None,
    }
}
fn color_of_piece_on_square ( position : ( u8 , u8 ) , pieces : & [ Piece ] ) -> Option < PieceColor > { match get_piece_on_square ( position , pieces ) { Some ( piece ) => Some ( piece . color ) , None => None , } }
Returns the color of the piece at the given position, None otherwise.
Returns the color of the piece at the given position None otherwise .
position
(u8, u8)
pieces
&[Piece]
position
(u8, u8)
pieces
&[Piece]