pub fn broadcast_message(&self, sender: &mut (dyn Player), message: &str) {
        // TODO: better iterating method.
        for i in 0..128 {
            if sender.get_uid() != i {
                if let Some(mut ply) = self.get_player_by_uid_mut(i) {
                    /*let packet =
                        Box::new(Message::new(sender.get_uid() as i8, String::from(message)));

                    ply.handle_packet(packet);*/
                    ply.send_message(message);
                }
            }
        }

        // Sender receives directly.
        /*let packet = Box::new(Message::new(sender.get_uid() as i8, String::from(message)));
        sender.handle_packet(packet);*/
        sender.send_message(message);
    }
// TODO: Use better method for broadcasting packets.
Use better method for broadcasting packets.
Use better method for broadcasting packets .
pub fn broadcast_message(&self, sender: &mut (dyn Player), message: &str) {
        // TODO: better iterating method.
        for i in 0..128 {
            if sender.get_uid() != i {
                if let Some(mut ply) = self.get_player_by_uid_mut(i) {
                    /*let packet =
                        Box::new(Message::new(sender.get_uid() as i8, String::from(message)));
                    ply.handle_packet(packet);*/
                    ply.send_message(message);
                }
            }
        }
        // Sender receives directly.
        /*let packet = Box::new(Message::new(sender.get_uid() as i8, String::from(message)));
        sender.handle_packet(packet);*/
        sender.send_message(message);
    }
pub fn broadcast_message ( & self , sender : & mut ( dyn Player ) , message : & str ) { // TODO: better iterating method. for i in 0 .. 128 { if sender . get_uid ( ) != i { if let Some ( mut ply ) = self . get_player_by_uid_mut ( i ) { /*let packet =
                        Box::new(Message::new(sender.get_uid() as i8, String::from(message)));

                    ply.handle_packet(packet);*/ ply . send_message ( message ) ; } } } // Sender receives directly. /*let packet = Box::new(Message::new(sender.get_uid() as i8, String::from(message)));
        sender.handle_packet(packet);*/ sender . send_message ( message ) ; }
TODO: Use better method for broadcasting packets.
TODO : Use better method for broadcasting packets .
&self
sender
&mut (dyn Player)
message
&str
&self
sender
&mut (dyn Player)
message
&str