2D Physics Ball Collision Simulator Using a heap