cargo fmt
This commit is contained in:
parent
352e853beb
commit
3d622394a0
13
src/board.rs
13
src/board.rs
@ -37,7 +37,11 @@ impl fmt::Display for Board {
|
||||
|
||||
// Print the current score
|
||||
let (white_score, black_score) = self.get_score();
|
||||
writeln!(f, "White Score: {}\nBlack Score: {}", white_score, black_score)?;
|
||||
writeln!(
|
||||
f,
|
||||
"White Score: {}\nBlack Score: {}",
|
||||
white_score, black_score
|
||||
)?;
|
||||
|
||||
// Print game over screen
|
||||
if self.game_over() == true {
|
||||
@ -50,8 +54,6 @@ impl fmt::Display for Board {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
impl Board {
|
||||
@ -208,12 +210,10 @@ impl Board {
|
||||
if white_score > black_score {
|
||||
Some(Piece::White)
|
||||
}
|
||||
|
||||
// Black Wins
|
||||
else if black_score > white_score {
|
||||
Some(Piece::Black)
|
||||
}
|
||||
|
||||
// Tie
|
||||
else {
|
||||
None
|
||||
@ -227,8 +227,7 @@ impl Board {
|
||||
|
||||
if max_score == combined_score {
|
||||
true
|
||||
}
|
||||
else {
|
||||
} else {
|
||||
false
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user