diff --git a/scene/game.lua b/scene/game.lua index 67ca919..5bc08f0 100644 --- a/scene/game.lua +++ b/scene/game.lua @@ -8,7 +8,7 @@ function GameScene:new(game_mode, ruleset, inputs) self.retry_mode = game_mode self.retry_ruleset = ruleset self.secret_inputs = inputs - self.game = game_mode(config.gamemodesettings[game_mode.hash], self.secret_inputs) + self.game = game_mode(self.secret_inputs, config.gamemodesettings[game_mode.hash]) self.ruleset = ruleset(self.game) self.game:initialize(self.ruleset) self.inputs = { diff --git a/tetris/modes/gamemode.lua b/tetris/modes/gamemode.lua index d2c30d5..32caef7 100644 --- a/tetris/modes/gamemode.lua +++ b/tetris/modes/gamemode.lua @@ -15,7 +15,7 @@ GameMode.hash = "" GameMode.tagline = "" GameMode.rollOpacityFunction = function(age) return 0 end -function GameMode:new(config, secret_inputs) +function GameMode:new(secret_inputs, config) self.grid = Grid(10, 24) self.randomizer = Randomizer() self.piece = nil diff --git a/tetris/modes/marathon_a1.lua b/tetris/modes/marathon_a1.lua index f7b4504..a116fcf 100644 --- a/tetris/modes/marathon_a1.lua +++ b/tetris/modes/marathon_a1.lua @@ -14,8 +14,8 @@ MarathonA1Game.tagline = "Can you score enough points to reach the title of Gran -function MarathonA1Game:new(cfg) - MarathonA1Game.super:new(cfg) +function MarathonA1Game:new(_, cfg) + MarathonA1Game.super:new(_, cfg) self.roll_frames = 0 self.combo = 1 diff --git a/tetris/modes/marathon_a2.lua b/tetris/modes/marathon_a2.lua index a460890..1eb22f2 100644 --- a/tetris/modes/marathon_a2.lua +++ b/tetris/modes/marathon_a2.lua @@ -14,8 +14,8 @@ MarathonA2Game.tagline = "The points don't matter! Can you reach the invisible r -function MarathonA2Game:new(cfg) - MarathonA2Game.super:new(cfg) +function MarathonA2Game:new(_, cfg) + MarathonA2Game.super:new(_, cfg) self.roll_frames = 0 self.combo = 1 diff --git a/tetris/modes/survival_a2.lua b/tetris/modes/survival_a2.lua index f170aee..46ae65f 100644 --- a/tetris/modes/survival_a2.lua +++ b/tetris/modes/survival_a2.lua @@ -14,8 +14,8 @@ SurvivalA2Game.tagline = "The game starts fast and only gets faster!" -function SurvivalA2Game:new(cfg) - SurvivalA2Game.super:new(cfg) +function SurvivalA2Game:new(_, cfg) + SurvivalA2Game.super:new(_, cfg) self.roll_frames = 0 self.combo = 1 self.randomizer = History6RollsRandomizer()