pull/1/head
PolicyChanges1@gmail.com 2021-03-10 21:05:51 -05:00
parent 3df528cbad
commit ee9bcc5039
1 changed files with 11 additions and 9 deletions

20
dist/tetrion.js vendored
View File

@ -1305,15 +1305,17 @@ Tetris.prototype = {
side4X = tPiece.x + 2; side4X = tPiece.x + 2;
side4Y = tPiece.y + 2; side4Y = tPiece.y + 2;
if(matrix[side1Y][side1X] != 0) if(matrix[side4Y] != undefined && matrix[side3Y] != undefined) {
side1 = 1; if(matrix[side1Y][side1X] != 0)
if(matrix[side2Y][side2X] != 0) side1 = 1;
side2 = 1; if(matrix[side2Y][side2X] != 0)
// TODO: figure out why this occasionally is undefined side2 = 1;
if(matrix[side3Y] != undefined && matrix[side3Y][side3X] != 0) // TODO: figure out why this occasionally is undefined
side3 = 1; if(matrix[side3Y][side3X] != 0)
if(matrix[side4Y][side4X] != 0) side3 = 1;
side4 = 1; if(matrix[side4Y][side4X] != 0)
side4 = 1;
}
console.log("sides: " + side1+side2+side3+side4); console.log("sides: " + side1+side2+side3+side4);
// if Sides A and B + (C or D) are touching a Surface // if Sides A and B + (C or D) are touching a Surface