rows and columns are y and x

このコミットが含まれているのは:
woosh 2023-11-12 11:00:19 +00:00
コミット 78efac625e
1個のファイルの変更3行の追加3行の削除

6
uttt.c
ファイルの表示

@ -78,7 +78,7 @@ int ut_move(struct ut_state *new_state, const struct ut_state *old_state, int ro
return 0;
}
void show(const struct ut_state *state) {
void ut_show(const struct ut_state *state) {
#define tiles state->tiles
printf("Turn: %c\nPlay board: %d\n", (int)state->player, state->playBoard);
int play_board_row = -1;
@ -179,8 +179,8 @@ int main(int *argc, char **argv) {
};
while (true) {
int x, y;
show(&state);
bool ok = getpos(&state, &x, &y);
ut_show(&state);
bool ok = getpos(&state, &y, &x);
if (!ok) {continue;}
int err = ut_move(&state, &state, x, y);
if (err) {continue;}