diff options
author | stale <redkugelblitzin@gmail.com> | 2022-06-01 04:34:31 -0300 |
---|---|---|
committer | stale <redkugelblitzin@gmail.com> | 2022-06-01 04:34:31 -0300 |
commit | b1bef4d9bc28c9b4ef57b750368e92cb1878eba7 (patch) | |
tree | c501f0295b96d99f90f4096ad9ad610af578bace /src/main.rs | |
parent | 61cbf1a8b0c3df89d41bc52c3b188231b4334d3d (diff) |
localStorage of identities, UI overhaul
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 2 |
1 files changed, 1 insertions, 1 deletions
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<MetaMove>, 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}"))); }, |