/// <summary>Receives a clients new status, all other clients in the lobby are informed of the new status. This
        /// function calls CheckLobbyReady() when a status changes.</summary>
        /// <param name="clientID">The client identifier.</param>
        /// <param name="packet">The incoming packet.</param>
        /// <remarks>This function sends a "PlayerReadyChange" packet.</remarks>
        public static void ClientStatus(int clientID, Packet packet)
        {
            int id  = packet.ReadInt();
            int msg = packet.ReadInt();

            var player = GameServer.connectedClients[id];

            switch (msg)
            {
            case 0:
                Console.WriteLine(player.UserName + Constants.NOT_READY);
                break;

            case 1:
                Console.WriteLine(player.UserName + Constants.READY);
                break;

            case 2:
                Console.WriteLine(player.UserName + Constants.IN_GAME);
                break;
            }

            player.Status = msg;
            PacketSend.PlayerReadyChange(player.LobbyID, id, msg);

            CheckLobbyReady(player);
            ValidatePlayerID(clientID, id);
        }