disable first held piece

This commit is contained in:
Adrien MALINGREY 2024-08-03 00:07:23 +02:00
parent ab023ec982
commit 5d451db8f9

View File

@ -19,10 +19,10 @@ window.onload = function(event) {
function restart() {
stats.modal.hide()
holdQueue.init()
holdQueue.redraw()
stats.init()
matrix.init()
nextQueue.init()
nextQueue.redraw()
settings.init()
pauseSettings()
}
@ -133,12 +133,12 @@ let playerActions = {
scheduler.clearInterval(fall)
scheduler.clearTimeout(lockDown)
matrix.piece.facing = FACING.NORTH
matrix.piece.locked = false
let piece = matrix.piece
generate(holdQueue.piece)
matrix.piece.holdEnabled = false
let heldPiece = holdQueue.piece
holdQueue.piece = matrix.piece
generate(heldPiece)
piece.facing = FACING.NORTH
piece.locked = false
holdQueue.piece = piece
}
},