We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7e7ba4a commit bf37e31Copy full SHA for bf37e31
C++/design-tic-tac-toe.cpp
@@ -17,7 +17,7 @@ class TicTacToe {
17
1: Player 1 wins.
18
2: Player 2 wins. */
19
int move(int row, int col, int player) {
20
- const int i = player - 1;
+ const auto i = player - 1;
21
++rows_[row][i], ++cols_[col][i];
22
if (row == col) {
23
++diagonal_[i];
0 commit comments