ELEC2645 (2019/20) / Mbed 2 deprecated ELEC2645_Project_el18ac

Dependencies:   mbed

Revision:
2:7fa08670b1fc
Child:
3:c61d0c70eda4
diff -r a084ee340d74 -r 7fa08670b1fc Game/Game.h
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/Game/Game.h	Tue May 26 16:26:12 2020 +0000
@@ -0,0 +1,41 @@
+#ifndef GAME_H
+#define GAME_H
+
+#include "mbed.h"
+#include "Gamepad.h"
+#include "N5110.h"
+#include <vector>
+#include "Menu.h"
+
+class Game
+{
+
+private:
+
+    int x;
+    int y;
+    int fruitX [16];
+    int fruitY [9];
+    int score;
+    int a;                              //used to select the direction based ont what button is pressed
+    int ntail;                          //used to increase lenght of the tail
+    int k;
+    int rx;
+    int ry;
+    char buffer[10];
+    int fruitX1;
+    int fruitY1;
+    vector <int> x_pos;
+    vector <int> y_pos;
+
+public:
+
+    Game();
+
+    void movement(Gamepad &pad);
+    bool death(N5110 &lcd,Gamepad &pad);
+    void draw(N5110 &lcd,Gamepad &pad);
+    void gameover(N5110 &lcd,Gamepad &pad);
+    void point(N5110 &lcd,Gamepad &pad);
+};
+#endif
\ No newline at end of file