colliding ball

with and without array