[position] Derive Default implementation for Position
This commit is contained in:
parent
e3ca466737
commit
a8ea248972
1 changed files with 1 additions and 11 deletions
|
@ -10,7 +10,7 @@ use chessfriend_core::{Color, Piece, Square};
|
|||
use std::{cell::OnceCell, fmt};
|
||||
|
||||
#[must_use]
|
||||
#[derive(Clone, Debug, Eq)]
|
||||
#[derive(Clone, Debug, Default, Eq)]
|
||||
pub struct Position {
|
||||
pub board: Board,
|
||||
pub(crate) moves: Vec<MoveRecord>,
|
||||
|
@ -180,16 +180,6 @@ impl ToFenStr for Position {
|
|||
}
|
||||
}
|
||||
|
||||
impl Default for Position {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
board: Board::default(),
|
||||
moves: Vec::default(),
|
||||
captures: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl PartialEq for Position {
|
||||
fn eq(&self, other: &Self) -> bool {
|
||||
self.board == other.board
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue