From 673e4900e93767b8bb3241b89c13424ff6fbf547 Mon Sep 17 00:00:00 2001 From: Vasil Zlatanov Date: Mon, 8 May 2017 00:40:40 +0100 Subject: Implement 2048 game prototype --- src/2048.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 src/2048.h (limited to 'src/2048.h') diff --git a/src/2048.h b/src/2048.h new file mode 100644 index 0000000..9b19f64 --- /dev/null +++ b/src/2048.h @@ -0,0 +1,17 @@ +#define SIZE 4 + +int move(int direction, int board[SIZE][SIZE]); + +void init(int board[SIZE][SIZE]); + +void add2(int board[SIZE][SIZE]); + +void rotate(int board[SIZE][SIZE]); + +int slideLeft(int board[SIZE][SIZE]); +int slideRight(int board[SIZE][SIZE]); +int slideUp(int board[SIZE][SIZE]); +int slideDown(int board[SIZE][SIZE]); +int gameover(int board[SIZE][SIZE]); + +int push(int array[SIZE]); -- cgit v1.2.3-54-g00ecf