zchess 0.1.0

(WIP) A library for calculating chess moves in a 3-dimensional space.
Documentation
//! Holds the types representing location specifications on a chess board (2D/3D).

/// Represents a chess file (i.e., row, x-position).
#[derive(Clone, Copy, Debug, Default, PartialEq, PartialOrd)]
pub enum File {
    #[default]
    A,
    B,
    C,
    D,
    E,
    F,
    G, 
    H,
}

impl File {
    /// Returns the variant as it's corresponding [`usize`] value.
    pub fn convert(self) -> usize {
        self as usize
    }
}


/// Represents a chess rank (i.e., column, y-position).
#[derive(Clone, Copy, Debug, Default, PartialEq, PartialOrd)]
pub enum Rank {
    #[default]
    A,
    B,
    C,
    D,
    E,
    F,
    G,
    H,
}

impl Rank {
    /// Returns the variant as it's corresponding [`usize`] value.
    pub fn convert(self) -> usize {
        self as usize
    }
}


/// Represents a chess tier (i.e., depth, z-position).
#[derive(Clone, Copy, Debug, Default, PartialEq, PartialOrd)]
pub enum Tier {
    #[default]
    A,
    B,
    C,
    D,
    E,
    F,
    G,
    H,
}

impl Tier {
    /// Returns the variant as it's corresponding [`usize`] value.
    pub fn convert(self) -> usize {
        self as usize
    }
}