Zavrsen iksoks

This commit is contained in:
fl3ka 2024-05-12 14:23:29 +02:00
parent 1918da4073
commit 926043d8c0

View File

@ -63,16 +63,22 @@ for(int i=0; i<8; i++){
cin >> col;
}
board[col-1][row-1] = player;
checkWin(board, player);
player = (player == 'X') ? 'O' : 'X';
if(board[col-1][row-1] == ' '){
board[col-1][row-1] = player;
checkWin(board, player);
player = (player == 'X') ? 'O' : 'X';
}
else{
cout << "###Place is taken###\n";
i--;
continue;
}
}
cout << "It's Draw!" << endl;
return 0;
}