-
-
Save melcor76/e703524828dd358e20bff233a8797ca2 to your computer and use it in GitHub Desktop.
js-tetris - piece hard-coded
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
class Piece { | |
constructor(ctx) { | |
this.ctx = ctx; | |
this.color = 'blue'; | |
this.shape = [ | |
[2, 0, 0], | |
[2, 2, 2], | |
[0, 0, 0] | |
]; | |
// Starting position. | |
this.x = 3; | |
this.y = 0; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment