creating a tron game in c++

hey guys
hit a bit of a challenge. i am writing code to to create a tron game. i have it all functioning and working fine however i need to add a function that checks for collisions. basically if one player goes head on with the second player then it is a draw. or if one player touches a cell already been occupied (marked with an 'o') then that player looses.
just need someone to get me going in the right direction.
ive attached sample code but it is not working for some reason.

bool Board::searchForCollision(){
gameOver=false;
if (board[rPosX][rPosY] ='O')
{
gameOver=true;
}

else
{
gameOver=false;
}
return gameOver;
}
> if (board[rPosX][rPosY] ='O')
Well using = rather than == would be an issue to start with.

Most compilers will warn that you're making this mistake if you enable enough warnings.

Try "-Wall -Wextra" in GCC/clang.
thanks for that, solved the problem. cant believe i missed that
thankyou
Topic archived. No new replies allowed.