summaryrefslogtreecommitdiff
path: root/src/2048.h
diff options
context:
space:
mode:
authorVasil Zlatanov <v@skozl.com>2017-05-08 00:40:40 +0100
committerVasil Zlatanov <v@skozl.com>2017-05-08 00:40:40 +0100
commit673e4900e93767b8bb3241b89c13424ff6fbf547 (patch)
tree2b5490596f90fd67f3bd0b1267315420c72baf73 /src/2048.h
parent8bd33441df8ecb4108e69362665f22a2ccf470e8 (diff)
downloade2-switch-673e4900e93767b8bb3241b89c13424ff6fbf547.tar.gz
e2-switch-673e4900e93767b8bb3241b89c13424ff6fbf547.tar.bz2
e2-switch-673e4900e93767b8bb3241b89c13424ff6fbf547.zip
Implement 2048 game prototype
Diffstat (limited to 'src/2048.h')
-rw-r--r--src/2048.h17
1 files changed, 17 insertions, 0 deletions
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]);