/// <summary>Receives a clients 'gameover'. All other clients in the lobby are notified of this.</summary>
        /// <param name="clientID">The client identifier.</param>
        /// <param name="packet">The incoming packet.</param>
        /// <remarks>This function sends a "PlayerGameOver" packet.</remarks>
        public static void ClientGameOver(int clientID, Packet packet)
        {
            int  id  = packet.ReadInt();
            bool msg = packet.ReadBool();

            PacketSend.PlayerGameOver(GameServer.connectedClients[id].LobbyID, id, msg);

            ValidatePlayerID(clientID, id);
        }
        /// <summary>Disconnect the client from the server, notify other users of this event, and reset the state of this client instance.
        /// If the client was in a lobby, check to see if that lobby is not empty. If so, delete the lobby.</summary>
        /// <param name="clientID">The clients unique ID</param>
        /// <remarks> This function sends a "PlayerList" packet.</remarks>
        /// <remarks> This function sends a "PlayerGameOver" packet.</remarks>
        /// <remarks> This function sends a "LobbyList" packet.</remarks>
        /// <remarks> This function sends a "PlayerCountChange" packet.</remarks>
        public void Disconnect()
        {
            Console.WriteLine(Constants.PLAYER_DISSCONECTED + UserName);
            tcp.Disconnect();

            if (LobbyID != -1)
            {
                PacketSend.PlayerList(LobbyID);
                PacketSend.PlayerGameOver(LobbyID, UID, true);

                GameServer.openLobbies[LobbyID].RemovePlayer(this);
            }

            PacketSend.LobbyList();
            PacketSend.PlayerCountChange(UID);

            UserName = null;
            Status   = 0;
            LobbyID  = -1;
        }