コミットを比較
2 コミット
e9f5127be7
...
ee6ba0c30a
作成者 | SHA1 | 日付 |
---|---|---|
ninya9k | ee6ba0c30a | |
ninya9k | da853c2ba2 |
13
uttt.c
13
uttt.c
|
@ -117,18 +117,19 @@ void ut_show(const struct ut_state *state) {
|
||||||
}
|
}
|
||||||
putchar(tiles[y][x] ? tiles[y][x] : ' ');
|
putchar(tiles[y][x] ? tiles[y][x] : ' ');
|
||||||
}
|
}
|
||||||
if (y / 3 == play_board_row) {
|
if (y / 3 == play_board_row || play_board_row == -1) {
|
||||||
printf("<");
|
printf("<");
|
||||||
}
|
}
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
}
|
}
|
||||||
if (play_board_col != -1) {
|
if (play_board_col == -1) {
|
||||||
|
printf(" ^^^ ^^^ ^^^");
|
||||||
|
} else {
|
||||||
printf(" ");
|
printf(" ");
|
||||||
for (int i = 0; i < play_board_col; i++) {
|
for (int i = 0; i < play_board_col; i++) {
|
||||||
printf(" ");
|
printf(" ");
|
||||||
}
|
}
|
||||||
printf("^^^");
|
printf("^^^");
|
||||||
putchar('\n');
|
|
||||||
}
|
}
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
#undef tiles
|
#undef tiles
|
||||||
|
@ -181,6 +182,12 @@ int main(int *argc, char **argv) {
|
||||||
while (true) {
|
while (true) {
|
||||||
int x, y;
|
int x, y;
|
||||||
ut_show(&state);
|
ut_show(&state);
|
||||||
|
for (int j = 0; j < 3; j++) {
|
||||||
|
for (int i = 0; i < 3; i++) {
|
||||||
|
putchar(state.boards[j][i]);
|
||||||
|
}
|
||||||
|
putchar('\n');
|
||||||
|
}
|
||||||
bool ok = getpos(&state, &y, &x);
|
bool ok = getpos(&state, &y, &x);
|
||||||
if (!ok) {continue;}
|
if (!ok) {continue;}
|
||||||
int err = ut_move(&state, &state, x, y);
|
int err = ut_move(&state, &state, x, y);
|
||||||
|
|
読み込み中…
新しいイシューから参照