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> {
 | 
					pub struct Builder<S: Style> {
 | 
				
			||||||
    style: S,
 | 
					    style: S,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
 | 
					#[derive(Clone, Debug, Eq, PartialEq)]
 | 
				
			||||||
pub struct Null;
 | 
					pub struct Null;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
 | 
					#[derive(Clone, Debug, Eq, PartialEq)]
 | 
				
			||||||
pub struct Push {
 | 
					pub struct Push {
 | 
				
			||||||
    from: Option<Square>,
 | 
					    from: Option<Square>,
 | 
				
			||||||
    to: Option<Square>,
 | 
					    to: Option<Square>,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
 | 
					#[derive(Clone, Debug, Eq, PartialEq)]
 | 
				
			||||||
pub struct DoublePush {
 | 
					pub struct DoublePush {
 | 
				
			||||||
    from: Square,
 | 
					    from: Square,
 | 
				
			||||||
    to: Square,
 | 
					    to: Square,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
 | 
					#[derive(Clone, Debug, Eq, PartialEq)]
 | 
				
			||||||
pub struct Capture {
 | 
					pub struct Capture {
 | 
				
			||||||
    push: Push,
 | 
					    push: Push,
 | 
				
			||||||
    capture: Option<Square>,
 | 
					    capture: Option<Square>,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
#[derive(Clone, Copy, Debug, Eq, PartialEq)]
 | 
					#[derive(Clone, Debug, Eq, PartialEq)]
 | 
				
			||||||
pub struct EnPassantCapture {
 | 
					pub struct EnPassantCapture {
 | 
				
			||||||
    push: Push,
 | 
					    push: Push,
 | 
				
			||||||
    capture: Option<Square>,
 | 
					    capture: Option<Square>,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#[derive(Clone, Debug, Eq, PartialEq)]
 | 
				
			||||||
pub struct Promotion<S> {
 | 
					pub struct Promotion<S> {
 | 
				
			||||||
    style: S,
 | 
					    style: S,
 | 
				
			||||||
    promotion: PromotionShape,
 | 
					    promotion: PromotionShape,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#[derive(Clone, Debug, Eq, PartialEq)]
 | 
				
			||||||
pub struct Castle {
 | 
					pub struct Castle {
 | 
				
			||||||
    castle: castle::Castle,
 | 
					    castle: castle::Castle,
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue