use std::collections::HashMap; use std::net::SocketAddr; use std::sync::Arc; use tokio::sync::mpsc::Sender; use tokio::sync::RwLock; #[derive(Clone)] pub struct ClientManager { pub handlers: Arc>>, pub usernames: Arc>>, pub players: Arc>> } #[derive(Default)] pub struct Player { pub id: u16, pub x: f64, pub y: f64, pub vel_x: f64, pub vel_y: f64, } #[derive(Clone)] pub struct ClientHandler { pub tx: Sender } pub enum ClientHandlerMessage { Tick, ChatMessage { from: String, message: String } }