Zavrsen iksoks
This commit is contained in:
parent
1918da4073
commit
926043d8c0
10
iksoks.cpp
10
iksoks.cpp
@ -63,16 +63,22 @@ for(int i=0; i<8; i++){
|
|||||||
cin >> col;
|
cin >> col;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(board[col-1][row-1] == ' '){
|
||||||
board[col-1][row-1] = player;
|
board[col-1][row-1] = player;
|
||||||
|
|
||||||
checkWin(board, player);
|
checkWin(board, player);
|
||||||
|
|
||||||
player = (player == 'X') ? 'O' : 'X';
|
player = (player == 'X') ? 'O' : 'X';
|
||||||
|
}
|
||||||
|
|
||||||
|
else{
|
||||||
|
cout << "###Place is taken###\n";
|
||||||
|
i--;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
cout << "It's Draw!" << endl;
|
cout << "It's Draw!" << endl;
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user