DESCRIPTION
To detect collisions faster we'll write a Grid on which we'll mark objects (as well as the grid itself). Collisions can occur with other objects that are marked on the grid or with the grid itself. Should multiple collisions occur collide_with_grid will return the earliest one. On one cell of the 2D table below , there can be multiple Entities.