C88 and C89 update

pull/4/head
Ishaan Bhardwaj 2021-04-11 18:33:18 -04:00
parent 2d88f1b084
commit 3fa0fb4151
2 changed files with 2 additions and 2 deletions

View File

@ -120,7 +120,6 @@ local score_table = {[0] = 0, 1, 4, 9, 20}
function MarathonC88Game:updateScore(level, drop_bonus, cleared_lines) function MarathonC88Game:updateScore(level, drop_bonus, cleared_lines)
local bravo = self.grid:checkForBravo(cleared_lines) and 10 or 1 local bravo = self.grid:checkForBravo(cleared_lines) and 10 or 1
self.score = self.score + score_table[cleared_lines] * 100 * self:getScoreMultiplier() * bravo
self.level_lines = self.level_lines + cleared_lines self.level_lines = self.level_lines + cleared_lines
self.lines = self.lines + cleared_lines self.lines = self.lines + cleared_lines
if (cleared_lines >= 1) then self.line_clears = self.line_clears + 1 end if (cleared_lines >= 1) then self.line_clears = self.line_clears + 1 end
@ -130,6 +129,7 @@ function MarathonC88Game:updateScore(level, drop_bonus, cleared_lines)
self.level_lines = 0 self.level_lines = 0
self.level_timer = 0 self.level_timer = 0
end end
self.score = self.score + score_table[cleared_lines] * 100 * self:getScoreMultiplier() * bravo
end end
function MarathonC88Game:drawGrid() function MarathonC88Game:drawGrid()

View File

@ -167,9 +167,9 @@ end
function MarathonC89Game:updateScore(level, drop_bonus, cleared_lines) function MarathonC89Game:updateScore(level, drop_bonus, cleared_lines)
if cleared_lines > 0 then if cleared_lines > 0 then
self.score = self.score + cleared_line_scores[cleared_lines] * (self.level + 1)
self.lines = self.lines + cleared_lines self.lines = self.lines + cleared_lines
self.level = self:getLevelForLines() self.level = self:getLevelForLines()
self.score = self.score + cleared_line_scores[cleared_lines] * (self.level + 1)
self.line_clears = self.line_clears + 1 self.line_clears = self.line_clears + 1
if cleared_lines == 4 then self.tetrises = self.tetrises + 1 end if cleared_lines == 4 then self.tetrises = self.tetrises + 1 end
for i = 1, 4 do for i = 1, 4 do