'Check for collisions after Mario is moved on the x axis'

def check_mario_x_collisions(self):

    collider = pg.sprite.spritecollideany(self.mario, self.ground_step_pipe_group)
    coin_box = pg.sprite.spritecollideany(self.mario, self.coin_box_group)
    brick = pg.sprite.spritecollideany(self.mario, self.brick_group)
    enemy = pg.sprite.spritecollideany(self.mario, self.enemy_group)
    shell = pg.sprite.spritecollideany(self.mario, self.shell_group)
    powerup = pg.sprite.spritecollideany(self.mario, self.powerup_group)
    if coin_box:
        self.adjust_mario_for_x_collisions(coin_box)
    elif brick:
        self.adjust_mario_for_x_collisions(brick)
    elif collider:
        self.adjust_mario_for_x_collisions(collider)
    elif enemy:
        if self.mario.invincible:
            setup.SFX['kick'].play()
            self.game_info[c.SCORE] += 100
            self.moving_score_list.append(score.Score((self.mario.rect.right - self.viewport.x), self.mario.rect.y, 100))
            enemy.kill()
            enemy.start_death_jump(c.RIGHT)
            self.sprites_about_to_die_group.add(enemy)
        elif self.mario.big:
            setup.SFX['pipe'].play()
            self.mario.fire = False
            self.mario.y_vel = (-1)
            self.mario.state = c.BIG_TO_SMALL
            self.convert_fireflowers_to_mushrooms()
        elif self.mario.hurt_invincible:
            pass
        else:
            self.mario.start_death_jump(self.game_info)
            self.state = c.FROZEN
    elif shell:
        self.adjust_mario_for_x_shell_collisions(shell)
    elif powerup:
        if (powerup.name == c.STAR):
            self.game_info[c.SCORE] += 1000
            self.moving_score_list.append(score.Score((self.mario.rect.centerx - self.viewport.x), self.mario.rect.y, 1000))
            self.mario.invincible = True
            self.mario.invincible_start_timer = self.current_time
        elif (powerup.name == c.MUSHROOM):
            setup.SFX['powerup'].play()
            self.game_info[c.SCORE] += 1000
            self.moving_score_list.append(score.Score((self.mario.rect.centerx - self.viewport.x), (self.mario.rect.y - 20), 1000))
            self.mario.y_vel = (-1)
            self.mario.state = c.SMALL_TO_BIG
            self.mario.in_transition_state = True
            self.convert_mushrooms_to_fireflowers()
        elif (powerup.name == c.LIFE_MUSHROOM):
            self.moving_score_list.append(score.Score((powerup.rect.right - self.viewport.x), powerup.rect.y, c.ONEUP))
            self.game_info[c.LIVES] += 1
            setup.SFX['one_up'].play()
        elif (powerup.name == c.FIREFLOWER):
            setup.SFX['powerup'].play()
            self.game_info[c.SCORE] += 1000
            self.moving_score_list.append(score.Score((self.mario.rect.centerx - self.viewport.x), self.mario.rect.y, 1000))
            if (self.mario.big and (self.mario.fire == False)):
                self.mario.state = c.BIG_TO_FIRE
                self.mario.in_transition_state = True
            elif (self.mario.big == False):
                self.mario.state = c.SMALL_TO_BIG
                self.mario.in_transition_state = True
                self.convert_mushrooms_to_fireflowers()
        if (powerup.name != c.FIREBALL):
            powerup.kill()
