Implemented ending condition on Ball