checks the right board for win after move
このコミットが含まれているのは:
コミット
14d8c75790
2
uttt.c
2
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;
|
||||
|
|
読み込み中…
新しいイシューから参照