From 4ad67ac92de26b12cbf6cd671de689e7d11ebebb Mon Sep 17 00:00:00 2001 From: tslil Date: Tue, 12 Jan 2021 21:42:35 -0500 Subject: Well it works, and it's bad. Many bugs fixed in interim --- src/ctaklm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/ctaklm.c b/src/ctaklm.c index 87fc30f..13326f9 100644 --- a/src/ctaklm.c +++ b/src/ctaklm.c @@ -60,7 +60,8 @@ print_cell_line(const uint8_t line, } } if (idx < stack_size) { - put_stone(STONE_AT(location), colours[location] & (1 << idx), + put_stone(STONE_AT(location), + (colours[location] & (1 << idx)) ? C_BLACK : C_WHITE, idx == 0, idx >= board_size); } else { putchar(' '); @@ -125,7 +126,7 @@ print_square(const uint8_t col, const uint8_t row) { uint8_t mask = 1 << (stack_size - 1); for (uint8_t k = 0; k < stack_size; k++, mask >>= 1) { put_stone(STONE_AT(THE_COORDS(col, row)), - colours[THE_COORDS(col, row)] & mask, + (colours[THE_COORDS(col, row)] & mask) ? C_BLACK : C_WHITE, k+1 == stack_size, stack_size-k >= board_size); } -- cgit v1.3.1