pub type IBoard = [[IPiece; 8]; 8];
pub type IPiece = u8;
pub type IPlayer = u8;
#[allow(dead_code)]
pub struct IGameAttrs {
pub board_str: String,
pub last_piece_str: String,
pub turn_str: String,
}
#[allow(dead_code)]
pub struct IPosition {
pub rightwards: i8,
pub downwards: i8,
}
impl IPosition {
pub fn add(&mut self, other: IPosition) {
self.rightwards += other.rightwards;
self.downwards += other.downwards;
}
pub fn duplicate(&self) -> IPosition {
IPosition {
rightwards: self.rightwards,
downwards: self.downwards,
}
}
}
pub type IPositionOption = Option<IPosition>;