//The method checks for the data recieved and creates the world, destroys a block, or shows the winner as neccessary.
void MultiplayerGUI::processInput(QString input)
{
    if (input.indexOf("LEVEL:") != -1){
        input.remove(0,6);
        GenerateMuliWorld(input);
    }
    else if(input.indexOf("DESTROY:") != -1){
        input.remove(0,8);
        ProcessThread * thread = new ProcessThread(gamewindow);
        connect(thread, &QThread::finished, this, &MultiplayerGUI::processFinished);
        thread->setInput(input);
        thread->start();
    }
    else if(input.indexOf("WINNER:") != -1){
        input.remove(0,7);
        QMessageBox::about(gamewindow, "Winner", input);
        gamewindow->close();
    }
}