2024-01-19 17:51:57 -08:00
|
|
|
// Eryn Wells <eryn@erynwells.me>
|
|
|
|
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! position {
|
|
|
|
[$($color:ident $shape:ident on $square:ident),* $(,)?] => {
|
|
|
|
$crate::PositionBuilder::new()
|
|
|
|
$(.place_piece(piece!($color $shape on $square)))*
|
|
|
|
.build()
|
|
|
|
};
|
|
|
|
}
|
2024-01-21 13:06:44 -08:00
|
|
|
|
|
|
|
#[cfg(test)]
|
|
|
|
#[macro_export]
|
|
|
|
macro_rules! test_position {
|
|
|
|
[$($color:ident $shape:ident on $square:ident),* $(,)?] => {
|
|
|
|
{
|
|
|
|
let pos = $crate::PositionBuilder::new()
|
|
|
|
$(.place_piece(piece!($color $shape on $square)))*
|
|
|
|
.build();
|
|
|
|
println!("{pos}");
|
|
|
|
pos
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|