'Shell collisions along the y axis'

def check_shell_y_collisions(self, shell):

    collider = pg.sprite.spritecollideany(shell, self.ground_step_pipe_group)
    if collider:
        shell.y_vel = 0
        shell.rect.bottom = collider.rect.top
        shell.state = c.SHELL_SLIDE
    else:
        shell.rect.y += 1
        if (pg.sprite.spritecollideany(shell, self.ground_step_pipe_group) is None):
            shell.state = c.FALL
        shell.rect.y -= 1
