-
-
Save melcor76/2bb8193b939a2f62e2a426196a43b9e3 to your computer and use it in GitHub Desktop.
js-tetris - freeze
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
freeze() { | |
this.piece.shape.forEach((row, y) => { | |
row.forEach((value, x) => { | |
if (value > 0) { | |
this.grid[y + this.piece.y][x + this.piece.x] = value; | |
} | |
}); | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment