summaryrefslogtreecommitdiff
path: root/cmd/main.c
diff options
context:
space:
mode:
authorRobby Zambito <contact@robbyzambito.me>2021-07-25 23:45:33 -0400
committerRobby Zambito <contact@robbyzambito.me>2021-07-25 23:45:33 -0400
commitbabc796fdbc3f571c18c841a33d0af37ea768dca (patch)
treeb46dec93772e6bc0027c4dd43a82825ba8fd66cc /cmd/main.c
Initial commit
Diffstat (limited to 'cmd/main.c')
-rw-r--r--cmd/main.c31
1 files changed, 31 insertions, 0 deletions
diff --git a/cmd/main.c b/cmd/main.c
new file mode 100644
index 0000000..164b32d
--- /dev/null
+++ b/cmd/main.c
@@ -0,0 +1,31 @@
+#include <libguile.h>
+#include <stdbool.h>
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "othello.h"
+
+int main(int argc, char **argv) {
+ player_color board[8][8];
+ initialize_board(board);
+
+ /*print_board(board);*/
+
+ char winner = game_loop(board);
+
+ switch (winner) {
+ case WHITE:
+ puts("Congratulations for winning player 1!");
+ break;
+ case BLACK:
+ puts("Congratulations for winning player 2!");
+ break;
+ default:
+ puts("The game ended with no winner.");
+ }
+
+ puts("Here was the final board:");
+ print_board(board);
+
+ return EXIT_SUCCESS;
+}