[board] Clean up interfaces of pieces and square structs

This commit is contained in:
Eryn Wells 2023-12-29 09:17:33 -08:00
parent 301fe1a4f4
commit 41421dddbb
5 changed files with 57 additions and 31 deletions

View file

@ -24,7 +24,7 @@ impl<'a> fmt::Display for DiagramFormatter<'a> {
for file in 0..8 {
let square = Square::from_rank_file(rank, file).unwrap();
match self.0.piece_on_square(square) {
Some(placed_piece) => write!(output, "{} ", placed_piece.piece)?,
Some(placed_piece) => write!(output, "{} ", placed_piece.piece())?,
None => output.push_str(". "),
}
}