class colliding balls

colliding balls with class and array