Skip to content

Commit 282b6ce

Browse files
committed
this should do the same right
1 parent 8ac28c5 commit 282b6ce

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

Games/Tetris/Tetris.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,7 @@ Tetris.prototype.remove = function(tetromino) {
148148
*/
149149
Tetromino.prototype.forEachBlock = function(callback) {
150150
this.layout.forEach(function(row, y) {
151-
row.forEach(function(block, x) {
152-
callback.call(this, block, x, y);
153-
}, this);
151+
row.forEach(callback.bind(this, y), this);
154152
}, this);
155153
}
156154

0 commit comments

Comments
 (0)