'Puts Mario flush next to the collider after moving on the x axis'

def adjust_mario_for_x_collisions(self, collider):

    if (self.mario.rect.x < collider.rect.x):
        self.mario.rect.right = collider.rect.left
    else:
        self.mario.rect.left = collider.rect.right
    self.mario.x_vel = 0
