Zavrsen iksoks

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

View File

@ -62,17 +62,23 @@ for(int i=0; i<8; i++){
cout << "Choose a column (1-3): \n";
cin >> col;
}
if(board[col-1][row-1] == ' '){
board[col-1][row-1] = player;
checkWin(board, player);
player = (player == 'X') ? 'O' : 'X';
}
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;
}