Arturs Kozlovskis / Mbed 2 deprecated ELEC2645_Project_el18ak

Dependencies:   mbed

Revision:
10:f5b920a6a71a
Parent:
9:4b11ee1155ad
Child:
14:739115711bf8
--- a/My_game_clases/Objects.h	Fri Apr 10 08:24:48 2020 +0000
+++ b/My_game_clases/Objects.h	Sat Apr 18 11:50:00 2020 +0000
@@ -8,30 +8,32 @@
 
 
 
-class Objects{
-   public:
-   
-   Objects();//initialises variables
-   void draw_base(N5110 &lcd);// draws the base
-   void cannon_position(Gamepad &pad);// changes the cannon position depending of the joystick
-   void draw_cannon(N5110 &lcd);//draws the cannon
-   void draw_shots(N5110 &lcd);// makes the shoting on the screen
-   //ball_x: balls x position; ball_y: balls y position; delta_r: added to the inital radiuss to make the ball bigger
-   void draw_ball(N5110 &lcd, int ball_x, int ball_y, int delta_r);//draws the ball
-   int get_size();//gets the size of _shot_y_pos vector
-   int get_x_value(int i);//gets _shot_x_pos(i)
-   int get_y_value(int i);//gets _shot_y_pos(i)
+class Objects
+{
+public:
+
+    Objects();//initialises variables
+    void draw_base(N5110 &lcd);// draws the base
+    void cannon_position(Gamepad &pad);// changes the cannon position depending of the joystick
+    void draw_cannon(N5110 &lcd);//draws the cannon
+    void draw_shots(N5110 &lcd);// makes the shoting on the screen
+    //ball_x: balls x position; ball_y: balls y position; delta_r: added to the inital radiuss to make the ball bigger
+    void draw_ball(N5110 &lcd, int ball_x, int ball_y, int delta_r);//draws the ball
+    int get_size();//gets the size of _shot_y_pos vector
+    int get_x_value(int i);//gets _shot_x_pos(i)
+    int get_y_value(int i);//gets _shot_y_pos(i)
     void erase_shot(int i);//erases _shot_x_pos(i) and _shot_y_pos(i)
-   
+    int get_x_cannon();
+
     vector <int> _shot_y_pos; //holds the shots y positions
     vector <int> _shot_x_pos;//holds the shots x positons
-   
-   
-   private:
-   int _cannon_pos; //stores the positon of the cannon
-   int _initial_shot_pos;//stroes the initial vertical position of the shot
-   int _shot_incrementer;//increments the shot on the lcd by 2
-   int _radiuss;// the initiak radiuss of the ball
-   
-}; 
-#endif 
\ No newline at end of file
+
+
+private:
+    int _cannon_pos; //stores the positon of the cannon
+    int _initial_shot_pos;//stroes the initial vertical position of the shot
+    int _shot_incrementer;//increments the shot on the lcd by 2
+    int _radiuss;// the initiak radiuss of the ball
+
+};
+#endif
\ No newline at end of file