Almost done with Sakura

This commit is contained in:
Ishaan Bhardwaj
2021-01-03 23:18:57 -05:00
parent 1a68cd8fce
commit 57bd6a8286
4 changed files with 35 additions and 2 deletions

View File

@@ -3,7 +3,7 @@ require 'funcs'
local GameMode = require 'tetris.modes.gamemode'
local Piece = require 'tetris.components.piece'
local History6RollsRandomizer = require 'tetris.randomizers.history_6rolls_35bag'
local SakuraRandomizer = require 'tetris.randomizers.sakura'
local SakuraGame = GameMode:extend()
@@ -267,7 +267,7 @@ local STAGE_TRANSITION_TIME = 300
function SakuraGame:new()
self.super:new()
self.randomizer = History6RollsRandomizer()
self.randomizer = SakuraRandomizer()
self.current_map = 1
self.time_limit = 10800
@@ -313,6 +313,12 @@ function SakuraGame:onPieceEnter()
self.stage_pieces = self.stage_pieces + 1
end
function SakuraGame:onPieceLock()
if effects[self.current_map] == "mirror" and self.stage_pieces % 3 == 0 then
self.grid:mirror()
end
end
function SakuraGame:advanceOneFrame(inputs, ruleset)
if self.ready_frames == 0 then
if self.lcd > 0 then