From b1bef4d9bc28c9b4ef57b750368e92cb1878eba7 Mon Sep 17 00:00:00 2001 From: stale Date: Wed, 1 Jun 2022 04:34:31 -0300 Subject: localStorage of identities, UI overhaul --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index a938a25..5012e95 100644 --- a/src/main.rs +++ b/src/main.rs @@ -249,7 +249,7 @@ async fn gameloop(mut move_rx: tokio::sync::mpsc::UnboundedReceiver, p board_encoder.write_all(&game.board.render()).unwrap(); let compressed_board = board_encoder.finish().unwrap(); let mut reply = vec![Message::binary(compressed_board)]; - let lpname = latest_player_name.as_ref().map(|s| s.as_str()).unwrap_or("unknown player"); + let lpname = latest_player_name.as_ref().map(|s| s.as_str()).unwrap_or("unknown player").replace(" ", " "); match game.phase { Phase::Win => { reply.push(Message::text(format!("win {lpname}"))); }, Phase::Die => { reply.push(Message::text(format!("lose {lpname}"))); }, -- cgit v1.2.3