-
-
Save melcor76/3b40e2fbbcd2fb8d1985ff5c794bf96b to your computer and use it in GitHub Desktop.
js-tetris main play
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
function play() { | |
board.reset(); | |
let piece = new Piece(ctx); | |
piece.draw(); | |
board.piece = piece; | |
} |
OK, thanks @ozgurkaragoz!
The working version is
function play() {
board.getEmptyBoard();
let piece = new Piece(ctx);
piece.draw();
board.piece = piece;
}
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It's not working without "board.piece = piece;"