#ifndef SERVERMESSAGE
#define SERVERMESSAGE

void setRColor(int red)
{
    sendMessageToServer("Rcolor",IntToStr(red));
}

void setGColor(int green)
{
    sendMessageToServer("Gcolor",IntToStr(green));
}

void setBColor(int blue)
{
    sendMessageToServer("Bcolor",IntToStr(blue));
}

void setRGBColor(int R, int G, int B)
{
    setRColor(R);
    setGColor(G);
    setBColor(B);
}

int getNumberOfRobots()
{
    return StrToInt( sendMessageToServer("numberOfRobots","get") );
}

float getDistanceFromRobot(int idRobota)
{
    return (float)StrToFloat( sendMessageToServer("distanceFromRobot", IntToStr(idRobota) ) );
}

float getAngleFromRobot(int idRobota)
{
    return (float)StrToFloat( sendMessageToServer("angleFromRobot", IntToStr(idRobota) ) );
}

int getMyId()
{
    return StrToInt( sendMessageToServer("getMyId","") );
}

bool amIAlive()
{
    if( sendMessageToServer("amIAlive","") == "1" )
        return true;
    else
        return false;
}

bool setPosition(float X, float Y)
{
    sendMessageToServer("positionX",FloatToStr(X));
    sendMessageToServer("positionY",FloatToStr(Y));
    return true;
}

bool setRotation(float rot)
{
    sendMessageToServer("rotationZ",FloatToStr(rot));
    return true;
}


#endif // SERVERMESSAGE

