mirror of
https://github.com/SashLilac/cambridge.git
synced 2024-11-25 11:29:02 -06:00
Compare commits
No commits in common. "90cf2ebef55c5c5544a500e2176f4417311f828b" and "b5db5bbdc3959086e5d09dd64d630480d24d7451" have entirely different histories.
90cf2ebef5
...
b5db5bbdc3
@ -127,6 +127,9 @@ function GameMode:update(inputs, ruleset)
|
||||
inputs["up"] = false
|
||||
inputs["down"] = false
|
||||
end
|
||||
if inputs["up"] then
|
||||
inputs["down"] = false
|
||||
end
|
||||
end
|
||||
|
||||
-- advance one frame
|
||||
@ -495,7 +498,14 @@ function GameMode:initializeOrHold(inputs, ruleset)
|
||||
self:initializeNextPiece(inputs, ruleset, self.next_queue[1])
|
||||
end
|
||||
self:onPieceEnter()
|
||||
self:onEnterOrHold(inputs, ruleset)
|
||||
if not self.grid:canPlacePiece(self.piece) then
|
||||
self.game_over = true
|
||||
return
|
||||
end
|
||||
ruleset:dropPiece(
|
||||
inputs, self.piece, self.grid, self:getGravity(),
|
||||
self:getDropSpeed(), self.drop_locked, self.hard_drop_locked
|
||||
)
|
||||
end
|
||||
|
||||
function GameMode:hold(inputs, ruleset, ihs)
|
||||
@ -520,18 +530,9 @@ function GameMode:hold(inputs, ruleset, ihs)
|
||||
if ihs then playSE("ihs")
|
||||
else playSE("hold") end
|
||||
self:onHold()
|
||||
self:onEnterOrHold(inputs, ruleset)
|
||||
end
|
||||
|
||||
function GameMode:onEnterOrHold(inputs, ruleset)
|
||||
if not self.grid:canPlacePiece(self.piece) then
|
||||
self.game_over = true
|
||||
return
|
||||
end
|
||||
ruleset:dropPiece(
|
||||
inputs, self.piece, self.grid, self:getGravity(),
|
||||
self:getDropSpeed(), self.drop_locked, self.hard_drop_locked
|
||||
)
|
||||
end
|
||||
|
||||
function GameMode:initializeNextPiece(
|
||||
|
Loading…
Reference in New Issue
Block a user