ELEC2645 (2018/19) / Mbed 2 deprecated el17cd

Dependencies:   mbed

Revision:
26:8a85aede976d
Parent:
25:3995271e411c
Child:
27:e46af658c67a
--- a/Game/Game.h	Wed Apr 03 20:03:47 2019 +0000
+++ b/Game/Game.h	Thu Apr 04 19:03:06 2019 +0000
@@ -17,22 +17,39 @@
 *@date April, 2019
 */
 
+struct Input{
+    float x;
+    bool yButton;
+    bool aButton;
+    bool bButton;
+    bool yCooldown;
+    bool aCooldown;
+    bool bCooldown;
+};
+
 class Game {
   private:
+    Input input;
     bool backToMenu;
     int noOfCubes;
     int homeSelection;
     bool deathMenuSelection;
     bool playing;
     int score;
+    bool selectDisable;
     Vector2D coord;
     Cube cubeArray[25];
     Face faceArray[150];
 
-    Ticker ticker;
+    Ticker disableA;
+    Ticker disableB;
+    Ticker disableY;
     Gamepad gamepad;
     Rasturizer renderer;
     
+    void resetScene();
+    /** @brief generates initial positions for all cubes
+    */
     void addScore();
     /** @brief Increments the score by 1
     */
@@ -65,6 +82,15 @@
     void homeButtonSelections();
     /** @brief Determines the action to be taken depending on the button input at the home screen
     */
+    void disableAButton(bool a);
+    void disableYButton(bool y);
+    void disableBButton(bool b);
+    void enableA();
+    void enableY();
+    void enableB();
+    void processInput();
+    
+    void play();
   public:
    Game();
    void run();