Can anyone help me understand the following line of code. I have tried googling the query, but no luck.
public int playerTurn(int token)
{
return token==P1 ? P2 : P1;
}
Can anyone help me understand the following line of code. I have tried googling the query, but no luck.
public int playerTurn(int token)
{
return token==P1 ? P2 : P1;
}
Well it is pretty much this
if(token == P1) return P2;
else return P1;