rows
and cols
of size n
to zero, and integers diagonal
and antiDiagonal
to zero.rows[row]
, cols[col]
, and if the move is on the diagonal, diagonal
, or if it's on the anti-diagonal, antiDiagonal
.n
or -n
. If so, the current player wins.