Remove the Copy trait from most move Styles and add Clone, Debug, Eq, and PartialEq to Promotion and Castle
This commit is contained in:
parent
f23967f4f3
commit
e172bfb5dd
1 changed files with 8 additions and 6 deletions
|
@ -31,43 +31,45 @@ pub trait Style {
|
|||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Builder<S: Style> {
|
||||
style: S,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Null;
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Push {
|
||||
from: Option<Square>,
|
||||
to: Option<Square>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct DoublePush {
|
||||
from: Square,
|
||||
to: Square,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Capture {
|
||||
push: Push,
|
||||
capture: Option<Square>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct EnPassantCapture {
|
||||
push: Push,
|
||||
capture: Option<Square>,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Promotion<S> {
|
||||
style: S,
|
||||
promotion: PromotionShape,
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, Eq, PartialEq)]
|
||||
pub struct Castle {
|
||||
castle: castle::Castle,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue