Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kuashio committed Dec 1, 2022
1 parent 05a7b06 commit 28148ac
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/10/Solution/ch10_tictactoe.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,13 @@ void make_move(char game[][3], char mark){
return;
}

// Take the middle square if vacant
if(game[1][1]==' '){
game[1][1] = mark;
return;
}

// Take any vacant square sequentially
for(i=0; i<3; i++)
for(j=0; j<3; j++)
if(game[i][j] == ' '){
Expand Down

0 comments on commit 28148ac

Please sign in to comment.