[board] Move piece! and position! macros to a new macros.rs module
This commit is contained in:
parent
e56b3259e2
commit
2269df2ed9
5 changed files with 22 additions and 21 deletions
|
@ -18,15 +18,6 @@ pub(crate) enum BoardSide {
|
|||
Queen,
|
||||
}
|
||||
|
||||
#[macro_export]
|
||||
macro_rules! position {
|
||||
[$($color:ident $shape:ident on $square:ident,)*] => {
|
||||
$crate::Position::from_iter([
|
||||
$($crate::piece!($color $shape on $square)),*
|
||||
].into_iter())
|
||||
};
|
||||
}
|
||||
|
||||
#[derive(Clone, Eq, PartialEq)]
|
||||
pub struct Position {
|
||||
color_to_move: Color,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue