[board] Add a piece! macro

This macro implements a tiny DSL for creating Pieces and PlacedPieces.

"White King" → Piece::new(Color::White, Shape::King)
"White King on E4" → PlacedPiece::new(Piece::new(Color::White, Shape::King), Square::E4)
This commit is contained in:
Eryn Wells 2024-01-12 22:26:13 -08:00
parent d2ee9244c2
commit 94ab64d277
2 changed files with 11 additions and 0 deletions

View file

@ -2,6 +2,7 @@
mod bitboard;
mod moves;
#[macro_use]
pub mod piece;
pub mod position;
mod square;