Holding a piece that would block you out now works

pull/16/head
Ishaan Bhardwaj 2021-01-27 13:29:53 -05:00
parent b22f671409
commit 1acd0ec65a
1 changed files with 3 additions and 0 deletions

View File

@ -167,6 +167,9 @@ function GameMode:update(inputs, ruleset)
if self.enable_hold and inputs["hold"] == true and self.held == false and self.prev_inputs["hold"] == false then
self:hold(inputs, ruleset)
self.prev_inputs = inputs
if not self.grid:canPlacePiece(self.piece) then
self.game_over = true
end
return
end