Lewis Cheadle 201245660

Dependencies:   mbed

Revision:
4:a9d5fca3b7ba
Parent:
3:4494e6928194
Child:
5:5c132202b642
--- a/Ball/Ball.cpp	Sat May 16 15:51:02 2020 +0000
+++ b/Ball/Ball.cpp	Sun May 17 15:55:47 2020 +0000
@@ -1,5 +1,4 @@
 #include "Ball.h"
-#include "Gamepad.h"
 
 Ball::Ball()
 {
@@ -11,17 +10,15 @@
 
 }
 
-int ball[2][2] = {
+
+void Ball::init(int ball_x_pos,int ball_y_pos)
+{
+    int ball[2][2] = {
     {1,1},
     {1,1},
     };
-
-void Ball::init(int ball_x_pos,int ball_y_pos)
-{
-
     ball_x_pos = 21;
     ball_y_pos = 0;
-
 }
 
 void Ball::draw(N5110 &lcd)
@@ -67,3 +64,16 @@
         ball_y_pos --;
         };
 }
+
+int Ball::get_ball_x_pos(){
+    return ball_x_pos;
+    }
+    
+int Ball::get_ball_y_pos(){
+    return ball_y_pos;
+    }
+
+void Ball::level_finish(){
+    ball_x_pos = 0;
+    ball_y_pos = 21;
+    }
\ No newline at end of file