Skip to content

Instantly share code, notes, and snippets.

@melcor76
Last active September 7, 2020 11:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save melcor76/e703524828dd358e20bff233a8797ca2 to your computer and use it in GitHub Desktop.
Save melcor76/e703524828dd358e20bff233a8797ca2 to your computer and use it in GitHub Desktop.
js-tetris - piece hard-coded
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