We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8ac28c5 commit 282b6ceCopy full SHA for 282b6ce
1 file changed
Games/Tetris/Tetris.js
@@ -148,9 +148,7 @@ Tetris.prototype.remove = function(tetromino) {
148
*/
149
Tetromino.prototype.forEachBlock = function(callback) {
150
this.layout.forEach(function(row, y) {
151
- row.forEach(function(block, x) {
152
- callback.call(this, block, x, y);
153
- }, this);
+ row.forEach(callback.bind(this, y), this);
154
}, this);
155
}
156
0 commit comments