- #1
kyacout
- 2
- 0
Code:
if(gameBoardState[i][col] == 0)
{
gameBoardState[i][col] = playerTurn;
break;
}
This code is supposed to change the values in gameBoardState[col] (a 2D array), but it changes values in other elements too. For example, when col = 0, and i = 5, gameBoardState[4][6] is changed with the same value as well.