+ 2
fix overwrite mark in old place
I think this problem in 4 DAYS and i cant find any way to fix this problem Using char array There is my code: https://code.sololearn.com/cpNxt5vUSpYV/?ref=app
1 Antwort
+ 2
Replace:
if(pos[i][0] == pos[i][1] && pos[i][1] == pos[i][2] || pos[0][j] == pos[1][j] && pos[1][j] == pos[2][j] || pos[0][0] == pos[1][1] && pos[1][1] == pos[2][2] || pos[0][2] == pos[1][1] && pos[1][1] == pos[2][0])
{
Win = true;
}
With :
if(((pos[i][0] == pos[i][1]) && (pos[i][1] == pos[i][2])) || ((pos[0][j] == pos[1][j]) && (pos[1][j] == pos[2][j])) || ((pos[0][0] == pos[1][1]) && (pos[1][1] == pos[2][2])) || ((pos[0][2] == pos[1][1]) && (pos[1][1] == pos[2][0])))
{
Win = true;
}
}