From 78efac625efe63905ef72963c18b078cdfcf6a42 Mon Sep 17 00:00:00 2001 From: woosh <> Date: Sun, 12 Nov 2023 11:00:19 +0000 Subject: [PATCH] rows and columns are y and x --- uttt.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/uttt.c b/uttt.c index 0d0e58d..1f75b0c 100644 --- a/uttt.c +++ b/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;}