//will loop and decode msgs as the queue gets updated
    public void msgProcessor()
    {
        while (gameRunning)
        {
            if (msgQueue.Count != 0)
            {
                MsgObject msgObject = msgQueue.Dequeue();
                String    msg       = msgObject.getMessage();
                DateTime  time      = msgObject.getTime();

                var splitString = msg.Split(':');

                //this will update message with time - to be printed on GUI
                message = time + " : " + msg + "\n";

                if (splitString.Length == 0)
                {
                    //a response msg which is a warning to be handled
                    warningHandler(msg);
                }
                else
                {
                    //if the server response is an update to the GUI

                    messageDeoder(msg);
                }

                //clears the coins list and update-Shanika
                coinLocations.Clear();
                for (int i = 0; i < Constant.MAP_SIZE; i++)
                {
                    for (int j = 0; j < Constant.MAP_SIZE; j++)
                    {
                        if (map[i, j] == "C")
                        {
                            coinLocations.Add((10 * (i)) + (j));
                        }
                    }
                }
            }
        }
    }