Compare commits

..

No commits in common. "33ba4ad0b95ff6537e40d7b7b0fbc587c77160cc" and "c0dd5bdc66dddbe31cc9d20c600dc3ec72064d17" have entirely different histories.

2 changed files with 11 additions and 6 deletions

15
app.js
View File

@ -607,8 +607,8 @@ function clock() {
timeCell.innerText = stats.time timeCell.innerText = stats.time
} }
function generate(piece) { function generate(piece=nextQueue.shift()) {
matrix.piece = piece || nextQueue.shift() matrix.piece = piece
if (matrix.piece.canMove(TRANSLATION.NONE)) { if (matrix.piece.canMove(TRANSLATION.NONE)) {
scheduler.setInterval(fall, stats.fallPeriod) scheduler.setInterval(fall, stats.fallPeriod)
@ -645,9 +645,14 @@ let playerActions = {
matrix.piece.holdEnabled = false matrix.piece.holdEnabled = false
matrix.piece.locked = false matrix.piece.locked = false
matrix.piece.orientation = ORIENTATION.NORTH matrix.piece.orientation = ORIENTATION.NORTH
let piece = holdQueue.piece if (holdQueue.piece) {
holdQueue.piece = matrix.piece let piece = holdQueue.piece
generate(piece) holdQueue.piece = matrix.piece
generate(piece)
} else {
holdQueue.piece = matrix.piece
generate()
}
} }
}, },

View File

@ -3,7 +3,7 @@
} }
body { body {
background: linear-gradient(#212529, #14171a) fixed; background: linear-gradient(#111315, #012) fixed;
} }
.modal-content { .modal-content {