-- Scoring formula:
-- Base: 10 points per piece in match
-- Combo: multiplied by chain number
-- Bonus: +50 for matches of 4, +100 for 5+

function calculate_score(self, match_count)
    local base = match_count * 10
    local combo_mult = self.combo
    local bonus = 0
    if match_count == 4 then bonus = 50
    elseif match_count >= 5 then bonus = 100
    end
    return base * combo_mult + bonus
end