Added Swift code for ABBall class