ECE 2036 Project

Dependencies:   mbed wave_player 4DGL-uLCD-SE

Revision:
2:2042f29de6b7
Parent:
0:cf4396614a79
--- a/game.h	Wed Nov 08 21:01:43 2017 +0000
+++ b/game.h	Thu Nov 21 16:10:57 2019 +0000
@@ -4,8 +4,7 @@
 #include "doublely_linked_list.h"
 
 /* A structure for holding all the game inputs */
-struct GameInputs
-{
+struct GameInputs {
     // Measurements from the accelerometer
     double ax, ay, az;
 };
@@ -24,6 +23,8 @@
 // Element types
 #define WALL        0
 #define BALL        1
+#define GOAL        2
+#define HOLE        3
 
 /** An ArenaElement struct representing the ball. */
 struct Ball {
@@ -33,6 +34,24 @@
     int x, y;
 };
 
+/** An ArenaElement struct representing the goal. */
+struct Goal {
+    // ArenaElement type (must be first element)
+    int type;
+    // Drawing info
+    int x, y;
+    int should_draw;
+};
+
+/** An ArenaElement struct representing a hole. */
+struct Hole {
+    // ArenaElement type (must be first element)
+    int type;
+    // Drawing info
+    int x, y;
+    int should_draw;
+};
+
 /////////////////////////
 // ArenaElement helpers
 /////////////////////////
@@ -43,8 +62,13 @@
 
 /* Add additional helpers for other ArenaElement types here */
 
+/** Draws the goal */
+void draw_goal(Goal* goal);
+/** Draws a hole */
+void draw_hole(Hole* hole);
+
 ///////////////////////////
-// Game control functions 
+// Game control functions
 ///////////////////////////
 /* Reads all game inputs */
 GameInputs read_inputs();