fix: formatting

This commit is contained in:
2026-09-05 16:40:46 +02:00
parent ef99710d0f
commit 89c127b10e
2 changed files with 3 additions and 4 deletions

View File

@@ -79,6 +79,7 @@ impl Board {
}
/// For testing
#[allow(dead_code)]
fn new_empty(player1: &mut Player, player2: &mut Player, size: Option<usize>) -> Self {
debug!("Creating new empty board!");
let size = size.unwrap_or(8);
@@ -104,6 +105,7 @@ impl Board {
Board { board, size }
}
#[allow(dead_code)]
fn place_pawn(&mut self, target: Position, owner: &Player) {
debug!("Placing new pawn by hand!");
self[target].pawn = Some(Pawn::new(owner));
@@ -131,6 +133,7 @@ impl Board {
pos.is_in_range(self.size) && self[pos].pawn.is_none()
}
#[allow(dead_code)]
fn is_pawn_movable(&self, pos: Position, player: &Player) -> bool {
self.get_available_moves(pos, player)
.is_some_and(|moves| !moves.is_empty())

View File

@@ -47,10 +47,6 @@ impl GuiFieldVec {
pub fn clear(&mut self) {
self.gui_fields.clear();
}
pub fn size(&self) -> usize {
self.gui_fields.len()
}
}
impl<'a> IntoIterator for &'a GuiFieldVec {