From e172bfb5dd9ef87d5760b8f09a9e7e3b72a7681b Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Tue, 13 Feb 2024 11:03:28 -0700 Subject: [PATCH] Remove the Copy trait from most move Styles and add Clone, Debug, Eq, and PartialEq to Promotion and Castle --- moves/src/builder.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/moves/src/builder.rs b/moves/src/builder.rs index 780ed73..e8144a1 100644 --- a/moves/src/builder.rs +++ b/moves/src/builder.rs @@ -31,43 +31,45 @@ pub trait Style { } } -#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] pub struct Builder { 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, to: Option, } -#[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, } -#[derive(Clone, Copy, Debug, Eq, PartialEq)] +#[derive(Clone, Debug, Eq, PartialEq)] pub struct EnPassantCapture { push: Push, capture: Option, } +#[derive(Clone, Debug, Eq, PartialEq)] pub struct Promotion { style: S, promotion: PromotionShape, } +#[derive(Clone, Debug, Eq, PartialEq)] pub struct Castle { castle: castle::Castle, }