aboutsummaryrefslogtreecommitdiff
path: root/main.h
diff options
context:
space:
mode:
authorpowergold1 <lstaut@hotmail.de>2016-09-19 02:50:27 +0200
committerpowergold1 <lstaut@hotmail.de>2016-09-19 02:50:27 +0200
commit222d0166f962e440037e8ca94b7ed2326f82e1a6 (patch)
treebc0129dea308511a1243ec9ad8fbae5e912225ef /main.h
downloadttfe-222d0166f962e440037e8ca94b7ed2326f82e1a6.tar.xz
initial commit
Diffstat (limited to 'main.h')
-rw-r--r--main.h38
1 files changed, 38 insertions, 0 deletions
diff --git a/main.h b/main.h
new file mode 100644
index 0000000..76a50d7
--- /dev/null
+++ b/main.h
@@ -0,0 +1,38 @@
+#ifndef BOARD_H_
+#define BOARD_H_
+
+#include <stdlib.h>
+#include <stdio.h>
+#include <stdbool.h>
+#include <assert.h>
+#include <time.h>
+
+typedef struct board board;
+typedef unsigned int uint;
+typedef unsigned long ulong;
+
+enum direction {
+ north,
+ south,
+ west,
+ east,
+};
+
+struct board {
+ uint x[4][4];
+ uint points;
+ uint num_p;
+};
+
+board *new_board();
+void init_board(board*);
+void free_board(board*);
+bool move_possible_any(board*);
+bool move_possible(board*, const int d);
+void make_move(board*, const int d);
+void move(board*, const int d);
+
+void print_board(board*);
+void print_score(board*);
+
+#endif