fix t-spin false positive

This commit is contained in:
Adrien MALINGREY 2019-10-27 20:10:48 +01:00
parent 95829b0b91
commit 8796d5b604

View File

@ -562,7 +562,7 @@ function locksDown(){
// T-Spin detection // T-Spin detection
var tSpin = T_SPIN.NONE var tSpin = T_SPIN.NONE
if (matrix.piece.rotatedLast && matrix.piece.shape == "T") { if (matrix.piece.rotatedLast && matrix.piece.shape == "T") {
const tSlots = T_SLOT_POS.translate(matrix.piece.pos).map(pos => matrix.cellIsOccupied(pos)), const tSlots = T_SLOT_POS.translate(matrix.piece.pos).map(pos => matrix.cellIsOccupied(...pos)),
a = tSlots[(matrix.piece.orientation+T_SLOT.A)%4], a = tSlots[(matrix.piece.orientation+T_SLOT.A)%4],
b = tSlots[(matrix.piece.orientation+T_SLOT.B)%4], b = tSlots[(matrix.piece.orientation+T_SLOT.B)%4],
c = tSlots[(matrix.piece.orientation+T_SLOT.C)%4], c = tSlots[(matrix.piece.orientation+T_SLOT.C)%4],