diff --git a/uttt.c b/uttt.c index f3d8163..4a7765b 100644 --- a/uttt.c +++ b/uttt.c @@ -85,7 +85,7 @@ int ut_move(struct ut_state *new_state, const struct ut_state *old_state, int ro // do move new_state->tiles[row][col] = old_state->player; - new_state->boards[row / 3][col / 3] = ut_winner((char *)new_state->tiles, 27 * (row % 3) + 3 * (col % 3), 9); + new_state->boards[row / 3][col / 3] = ut_winner((char *)new_state->tiles, 27 * (row / 3) + 3 * (col / 3), 9); // next play board - if next play board is not playable, play any board new_state->playBoard = new_state->boards[row % 3][col % 3] == '\0' ? 3 * (row % 3) + (col % 3) : -1;