Time for action – Writing the collision detection code