summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortslil <tslil@posteo.de>2021-01-12 21:42:35 -0500
committertslil <tslil@posteo.de>2021-01-12 21:42:35 -0500
commit539b9c9a875f1014fb1f9971272aa43bc220ac77 (patch)
tree49ced293e408b4cdf2ba389f019cfe4d131a5070 /src
parent0feeb0e9f9abc0c7d0ea0324bb3be73e0be371b2 (diff)
Well it works, and it's bad. Many bugs fixed in interim
Diffstat (limited to 'src')
-rw-r--r--src/ctaklm.c5
1 files changed, 3 insertions, 2 deletions
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);
}