]> git.lizzy.rs Git - ttfe.git/blob - main.h
Clear screen before drawing board
[ttfe.git] / main.h
1 #ifndef BOARD_H_
2 #define BOARD_H_
3
4 #include <stdlib.h>
5 #include <stdio.h>
6 #include <stdbool.h>
7 #include <assert.h>
8 #include <time.h>
9
10 typedef struct board board;
11 typedef unsigned int uint;
12 typedef unsigned long ulong;
13
14 enum direction {
15         north,
16         south,
17         west,
18         east,
19 };
20
21 struct board {
22         uint x[4][4];
23         uint points;
24         uint num_p;
25 };
26
27 board *new_board();
28 void init_board(board*);
29 void free_board(board*);
30 bool move_possible_any(board*);
31 bool move_possible(board*, const int d);
32 void make_move(board*, const int d);
33 void move(board*, const int d);
34
35 void print_board(board*);
36 void print_score(board*);
37
38 #endif