Directly rename board -> position
This commit is contained in:
parent
569693bda9
commit
220da08727
25 changed files with 0 additions and 0 deletions
|
@ -1,45 +0,0 @@
|
|||
// Eryn Wells <eryn@erynwells.me>
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! position {
|
||||
[$($color:ident $shape:ident on $square:ident),* $(,)?] => {
|
||||
$crate::PositionBuilder::new()
|
||||
$(.place_piece(
|
||||
chessfriend_core::PlacedPiece::new(
|
||||
chessfriend_core::Piece::new(
|
||||
chessfriend_core::Color::$color,
|
||||
chessfriend_core::Shape::$shape),
|
||||
chessfriend_core::Square::$square
|
||||
)
|
||||
))*
|
||||
.build()
|
||||
};
|
||||
}
|
||||
|
||||
#[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
|
||||
}
|
||||
};
|
||||
(empty) => {
|
||||
{
|
||||
let pos = Position::empty();
|
||||
println!("{pos}");
|
||||
pos
|
||||
}
|
||||
};
|
||||
(starting) => {
|
||||
{
|
||||
let pos = Position::starting();
|
||||
println!("{pos}");
|
||||
pos
|
||||
}
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue