// Eryn Wells #[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), $crate::square::Square::$square) } } #[macro_export] macro_rules! position { [$($color:ident $shape:ident on $square:ident),* $(,)?] => { $crate::PositionBuilder::new() $(.place_piece(piece!($color $shape on $square)))* .build() }; }