From 222d0166f962e440037e8ca94b7ed2326f82e1a6 Mon Sep 17 00:00:00 2001 From: powergold1 Date: Mon, 19 Sep 2016 02:50:27 +0200 Subject: initial commit --- main.h | 38 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 main.h (limited to 'main.h') 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 +#include +#include +#include +#include + +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 -- cgit v1.2.3