[core,board] Move board::piece to core

Break up types in core into finer grained modules.
Update all the imports.
This commit is contained in:
Eryn Wells 2024-01-24 17:08:27 -08:00
parent 6f85305912
commit 8b2a3926b3
25 changed files with 235 additions and 227 deletions

View file

@ -1,15 +1,5 @@
// Eryn Wells <eryn@erynwells.me>
#[macro_export]
macro_rules! piece {
($color:ident $shape:ident) => {
$crate::piece::Piece::new($crate::piece::Color::$color, $crate::piece::Shape::$shape)
};
($color:ident $shape:ident on $square:ident) => {
$crate::piece::PlacedPiece::new(piece!($color $shape), chessfriend_core::Square::$square)
}
}
#[macro_export]
macro_rules! position {
[$($color:ident $shape:ident on $square:ident),* $(,)?] => {