dunno2
This commit is contained in:
parent
3df528cbad
commit
ee9bcc5039
20
dist/tetrion.js
vendored
20
dist/tetrion.js
vendored
@ -1305,15 +1305,17 @@ Tetris.prototype = {
|
||||
side4X = tPiece.x + 2;
|
||||
side4Y = tPiece.y + 2;
|
||||
|
||||
if(matrix[side1Y][side1X] != 0)
|
||||
side1 = 1;
|
||||
if(matrix[side2Y][side2X] != 0)
|
||||
side2 = 1;
|
||||
// TODO: figure out why this occasionally is undefined
|
||||
if(matrix[side3Y] != undefined && matrix[side3Y][side3X] != 0)
|
||||
side3 = 1;
|
||||
if(matrix[side4Y][side4X] != 0)
|
||||
side4 = 1;
|
||||
if(matrix[side4Y] != undefined && matrix[side3Y] != undefined) {
|
||||
if(matrix[side1Y][side1X] != 0)
|
||||
side1 = 1;
|
||||
if(matrix[side2Y][side2X] != 0)
|
||||
side2 = 1;
|
||||
// TODO: figure out why this occasionally is undefined
|
||||
if(matrix[side3Y][side3X] != 0)
|
||||
side3 = 1;
|
||||
if(matrix[side4Y][side4X] != 0)
|
||||
side4 = 1;
|
||||
}
|
||||
|
||||
console.log("sides: " + side1+side2+side3+side4);
|
||||
// if Sides A and B + (C or D) are touching a Surface
|
||||
|
Loading…
Reference in New Issue
Block a user