'Mario collisions with bricks on the y-axis'

def adjust_mario_for_y_brick_collisions(self, brick):

    if (self.mario.rect.y > brick.rect.y):
        if (brick.state == c.RESTING):
            if (self.mario.big and (brick.contents is None)):
                setup.SFX['brick_smash'].play()
                self.check_if_enemy_on_brick(brick)
                brick.kill()
                self.brick_pieces_group.add(bricks.BrickPiece(brick.rect.x, (brick.rect.y - (brick.rect.height / 2)), (-2), (-12)), bricks.BrickPiece(brick.rect.right, (brick.rect.y - (brick.rect.height / 2)), 2, (-12)), bricks.BrickPiece(brick.rect.x, brick.rect.y, (-2), (-6)), bricks.BrickPiece(brick.rect.right, brick.rect.y, 2, (-6)))
            else:
                setup.SFX['bump'].play()
                if (brick.coin_total > 0):
                    self.game_info[c.COIN_TOTAL] += 1
                    self.game_info[c.SCORE] += 200
                self.check_if_enemy_on_brick(brick)
                brick.start_bump(self.moving_score_list)
        elif (brick.state == c.OPENED):
            setup.SFX['bump'].play()
        self.mario.y_vel = 7
        self.mario.rect.y = brick.rect.bottom
        self.mario.state = c.FALL
    else:
        self.mario.y_vel = 0
        self.mario.rect.bottom = brick.rect.top
        self.mario.state = c.WALK
