Simple fish eat program

Dependencies:   mbed mbed-rtos N5110 ShiftReg Tone

Revision:
12:20ac766b3175
Parent:
11:7c1e2a9303d3
Child:
13:183bd19f3d7d
--- a/classes/Game.h	Wed Apr 21 11:08:02 2021 +0000
+++ b/classes/Game.h	Wed Apr 21 15:24:31 2021 +0000
@@ -3,10 +3,11 @@
 
 #include "mbed.h"
 #include "N5110.h"
+#include "ShiftReg.h"
 #include "Joystick.h"
-#include "ShiftReg.h"
 
 #include "Graphics.h"
+#include "Sound.h"
 
 struct DIRECTION {
     Direction joy;
@@ -17,7 +18,7 @@
 public:
     
     //plays the game
-    void gamePlay(N5110 &lcd, DIRECTION direction);
+    void gamePlay(N5110 &lcd, Tone &dac, DIRECTION direction);
     
     //draws the playing area
     void init(N5110 &lcd, int x, int y, int Fish_size);
@@ -35,7 +36,7 @@
     int Lives();
     
     //check for collision with other fish
-    int Collision();
+    int Collision(Tone &dac);
     
     //generate enemy fish
     void enemyFish(N5110 &lcd);
@@ -54,24 +55,22 @@
     int FISH_SIZE;
     int FISH_HEIGHT;
     int FISH_WIDTH;
-    float CENTRE_X;
-    float CENTRE_Y;
     int E_FISH_HEIGHT;
     int E_FISH_WIDTH;
     int E_FISH;
-    float E_CENTRE_X;
-    float E_CENTRE_Y;
     int collision;
     int x_bound;
     int y_bound;
-
+    int check_score;
+    int SCORE;
+    int s_length;
     float centre_xpos;
     float centre_ypos;
-
-    int check_score;
-    int SCORE;
+    float CENTRE_X;
+    float CENTRE_Y;
+    float E_CENTRE_X;
+    float E_CENTRE_Y;
     char _score[14];
-    int s_length;
     
 };