ELEC2645 (2018/19) / Mbed 2 deprecated el17szs

Dependencies:   mbed

Revision:
17:b2b651acffae
Parent:
15:81a3aaf52647
--- a/Ball/Ball.cpp	Wed Apr 24 21:17:22 2019 +0000
+++ b/Ball/Ball.cpp	Sat Apr 27 14:09:21 2019 +0000
@@ -17,11 +17,19 @@
     _y1=3;
     _x = 42;
     _y = 15;
+    _ball_count=0;
     set_tone=0;
     bat.init(3,4);
     bowled=0;
+    _ball_count=0;
 
 }
+void Ball::increment_ball_count(){
+    _ball_count++;
+}
+int Ball::get_ball_count(){
+    return _ball_count;
+}
 Vector2D Ball::get_pos()
 {
     Vector2D p = {_x,_y};