Implement basic collision detection