fix overwrite mark in old place | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 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

22nd Jul 2021, 11:58 AM
Global Long
Global Long - avatar
1 Answer
+ 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; } }
26th Jul 2021, 12:54 AM
Aleksei Radchenkov
Aleksei Radchenkov - avatar