Added collision detection to the method that checks the positions of all in game objects