Implemented strategy pattern for the collision detection