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

Dependents:   RETRO_BallsAndPaddle RETRO_BallAndHoles

Revision:
5:065f19e08dcb
Parent:
3:441dc90d10ce
Child:
7:4fa3edaa1201
--- a/Ball.cpp	Sat Feb 28 11:40:24 2015 +0000
+++ b/Ball.cpp	Sat Feb 28 16:32:03 2015 +0000
@@ -86,6 +86,16 @@
     return(rBall.collides(r));
 }
 
+bool Ball::collides(Circle cObject)
+{
+    Circle cBall=this->getBoundingCircle();
+    Rectangle rBall=cBall.getBoundingRectangle();
+    Rectangle rObject=cObject.getBoundingRectangle();
+
+    return(rBall.collides(rObject));
+}
+
+
 bool Ball::collides(Line ln)
 {
     Circle cBall=this->getBoundingCircle();