Elements used in the Balls and Things games for the RETRO.

Dependents:   RETRO_BallsAndPaddle RETRO_BallAndHoles

Revision:
3:441dc90d10ce
Parent:
2:74bc9b16fb88
Child:
5:065f19e08dcb
--- a/Ball.cpp	Wed Feb 25 10:43:15 2015 +0000
+++ b/Ball.cpp	Thu Feb 26 11:46:46 2015 +0000
@@ -86,6 +86,12 @@
     return(rBall.collides(r));
 }
 
+bool Ball::collides(Line ln)
+{
+    Circle cBall=this->getBoundingCircle();
+    return(cBall.collides(ln));
+}
+
 void Ball::Bounce(Vector vBounce)
 {   // change the direction in a certain direction
     this->unmove(); // undo move to pre-bouncing position to avoid drawing on colliding position