Added collision detection for the random map