summaryrefslogtreecommitdiff
path: root/src/print_board.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/print_board.c')
-rw-r--r--src/print_board.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/print_board.c b/src/print_board.c
new file mode 100644
index 0000000..6624341
--- /dev/null
+++ b/src/print_board.c
@@ -0,0 +1,16 @@
+#include <stdio.h>
+
+#include "othello.h"
+
+void print_board(player_color board[8][8]) {
+ puts(" 0 1 2 3 4 5 6 7");
+
+ for (int row = 0; row < 8; row++) {
+ printf("%d ", row);
+
+ for (int col = 0; col < 8; col++) {
+ printf("%c ", board[row][col]);
+ }
+ printf("\n");
+ }
+}