diff --git a/server/src/connection.rs b/server/src/connection.rs index 6b2a5c1..246f032 100644 --- a/server/src/connection.rs +++ b/server/src/connection.rs @@ -45,18 +45,6 @@ pub struct Step { pub to: String, } -/*#[derive(Serialize, Deserialize, Debug)] -struct ServerMessage { - #[serde(rename = "type")] - message_type: String, - player_id: Option, - match_id: Option, - opponent: Option, - color: Option, - reason: Option, - response: Option, -}*/ - #[derive(Serialize, Deserialize)] pub enum ServerMessage2 { GameEnd { diff --git a/server/src/matchmaking.rs b/server/src/matchmaking.rs index 640dca5..c43448a 100644 --- a/server/src/matchmaking.rs +++ b/server/src/matchmaking.rs @@ -1,5 +1,5 @@ use crate::connection::ServerMessage2; -use crate::connection::{ConnectionMap, GameMatch, MatchMap, WaitingQueue, broadcast_to_match}; +use crate::connection::{ConnectionMap, GameMatch, MatchMap, WaitingQueue}; use log::{error, info, warn}; use rand::random; use uuid::Uuid; @@ -119,7 +119,7 @@ impl MatchmakingSystem { }; let _ = crate::connection::send_message_to_player_connection( - conn_map.get_mut(&white), + conn_map.get_mut(&black), &serde_json::to_string(&message).unwrap(), ) .await;