aboutsummaryrefslogtreecommitdiff
path: root/console/voerbak.c
diff options
context:
space:
mode:
authorlonkaars <l.leblansch@gmail.com>2021-02-16 12:59:45 +0100
committerlonkaars <l.leblansch@gmail.com>2021-02-16 12:59:45 +0100
commit1200fd15d5a110b15c16a333936bd3c74f90cbca (patch)
treebda82a026b57ecca81552787db49ce729f45671c /console/voerbak.c
parentb711f63c4087b3a9f5617af5b55afe93f414ddf5 (diff)
semi-working voerbak_connector.py
Diffstat (limited to 'console/voerbak.c')
-rw-r--r--console/voerbak.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/console/voerbak.c b/console/voerbak.c
index a7807b6..4ee20e4 100644
--- a/console/voerbak.c
+++ b/console/voerbak.c
@@ -11,6 +11,7 @@ void printBoard(int board[], int width, int height) {
for (int i = 0; i < width * height; i++)
printf("%d", board[i]);
printf("\n");
+ fflush(stdout);
}
void printHumanBoard(int board[], int width, int height) {
@@ -71,6 +72,7 @@ bool checkWin(int board[], int width, int height, int pos) {
int start_pos = pos + directions[i+0] * values[i+0];
int end_pos = pos + directions[i+4] * values[i+4];
printf("w:%d-%d\n", start_pos, end_pos);
+ fflush(stdout);
}
}