diff --git a/board/src/lib.rs b/board/src/lib.rs index 17ba31c..722899f 100644 --- a/board/src/lib.rs +++ b/board/src/lib.rs @@ -1,3 +1,5 @@ mod bitboard; +mod neighbor; +mod piece; mod position; mod square; diff --git a/board/src/neighbor.rs b/board/src/neighbor.rs new file mode 100644 index 0000000..65e3264 --- /dev/null +++ b/board/src/neighbor.rs @@ -0,0 +1,12 @@ +// Eryn Wells + +pub enum Direction { + North, + NorthWest, + West, + SouthWest, + South, + SouthEast, + East, + NorthEast, +} diff --git a/board/src/piece.rs b/board/src/piece.rs new file mode 100644 index 0000000..c4752e0 --- /dev/null +++ b/board/src/piece.rs @@ -0,0 +1,34 @@ +// Eryn Wells + +#[derive(Debug, Eq, PartialEq)] +pub enum Color { + White, + Black, +} + +#[derive(Debug, Eq, PartialEq)] +pub enum PieceShape { + Pawn, + Knight, + Bishop, + Rook, + Queen, + King, +} + +#[derive(Debug, Eq, PartialEq)] +pub enum PiecePlacementError { + PieceExistsOnSquare, +} + +#[derive(Debug, Eq, PartialEq)] +pub struct Piece { + pub color: Color, + pub piece: PieceShape, +} + +impl Piece { + pub fn new(color: Color, piece: PieceShape) -> Piece { + Piece { color, piece } + } +}