summaryrefslogtreecommitdiff
path: root/src/gui.rs
diff options
context:
space:
mode:
authortslil clingman <>2020-01-27 23:12:51 -0800
committertslil clingman <>2020-01-27 23:12:51 -0800
commit04d6efc6eaf31a3ba8c304884725d3c5e9bab9ae (patch)
treed302225eda75570562d04fed20a6d005d0ef24cc /src/gui.rs
parent38200848953b1d8d7ba083752c2621603842b54e (diff)
Names, who goes first, date in PTN
Diffstat (limited to 'src/gui.rs')
-rw-r--r--src/gui.rs6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/gui.rs b/src/gui.rs
index 1b5f8a2..ed5acb5 100644
--- a/src/gui.rs
+++ b/src/gui.rs
@@ -33,8 +33,7 @@ impl GameLog {
}
pub fn update(&self, game: &Game) {
- // No need to clear, always stays the same size
- self.pieces_window.mv(0, 0);
+ self.pieces_window.clear();
if self.has_colours {
self.pieces_window.attrset(ColorPair(self.white_colour));
@@ -85,15 +84,14 @@ impl GameLog {
if self.has_colours {
self.pieces_window.attrset(ColorPair(self.black_colour));
}
- self.pieces_window.addstr("Black");
}
Player::White => {
if self.has_colours {
self.pieces_window.attrset(ColorPair(self.white_colour));
}
- self.pieces_window.addstr("White");
}
}
+ self.pieces_window.addstr(game.query_current_player_name());
self.pieces_window.refresh();