diff --git a/iksoks.cpp b/iksoks.cpp index 5fe5bd0..4138f2a 100644 --- a/iksoks.cpp +++ b/iksoks.cpp @@ -27,11 +27,14 @@ void checkWin(char board[3][3], char player) { cout << board[0][0] << " WON!" << endl;} if(board[2][0] == player && board[1][1] == player && board[0][2] == player){ cout << board[2][0] << " WON!" << endl;} + + } int main(){ +int i; int row; int col; char player = 'X'; @@ -43,7 +46,7 @@ char board[3][3] = { { ' ', ' ', ' ' }, cout << "Welcome to Tic-Tac-Toe!\n"; -for(int i=0; i<8; i++){ +for(i=0; i<9; i++){ drawBoard(board); @@ -75,9 +78,11 @@ for(int i=0; i<8; i++){ continue; } } - -cout << "It's Draw!" << endl; - + +if(i = 9){ + cout << "It's Draw\n"; + drawBoard(board); +} return 0; }