'Changes mushroom direction if collision along x axis'

def adjust_mushroom_for_collision_x(self, item, collider):

    if (item.rect.x < collider.rect.x):
        item.rect.right = collider.rect.x
        item.direction = c.LEFT
    else:
        item.rect.x = collider.rect.right
        item.direction = c.RIGHT
