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)?;
|
writeln!(f, " {}", horiz_sep_line)?;
|
||||||
|
|
||||||
// Print the current score
|
// Print the current score
|
||||||
writeln!(
|
write!(
|
||||||
f,
|
f,
|
||||||
"White Score: {}\nBlack Score: {}",
|
"{}",
|
||||||
self.count(Piece::White),
|
[Piece::White, Piece::Black]
|
||||||
self.count(Piece::Black)
|
.map(|p| format!("{} Score: {}\n", p.text(), self.count(p)))
|
||||||
|
.concat()
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user