[position] Derive Default implementation for Position

This commit is contained in:
Eryn Wells 2025-05-27 11:49:46 -07:00
parent e3ca466737
commit a8ea248972

View file

@ -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