simplify board format score
This commit is contained in:
parent
f3742ce674
commit
34d1b0dcef
@ -149,11 +149,12 @@ impl fmt::Display for Board {
|
||||
writeln!(f, " {}", horiz_sep_line)?;
|
||||
|
||||
// Print the current score
|
||||
writeln!(
|
||||
write!(
|
||||
f,
|
||||
"White Score: {}\nBlack Score: {}",
|
||||
self.count(Piece::White),
|
||||
self.count(Piece::Black)
|
||||
"{}",
|
||||
[Piece::White, Piece::Black]
|
||||
.map(|p| format!("{} Score: {}\n", p.text(), self.count(p)))
|
||||
.concat()
|
||||
)?;
|
||||
|
||||
Ok(())
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user