Application Android et IOS pour l'amicale des élèves https://play.google.com/store/apps/details?id=fr.amicaleinsat.application
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

ShapeL.js 800B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // @flow
  2. import BaseShape from "./BaseShape";
  3. export default class ShapeL extends BaseShape {
  4. #colors: Object;
  5. constructor(colors: Object) {
  6. super();
  7. this.position.x = 3;
  8. this.#colors = colors;
  9. }
  10. getColor(): string {
  11. return this.#colors.tetrisL;
  12. }
  13. getShapes() {
  14. return [
  15. [
  16. [0, 0, 1],
  17. [1, 1, 1],
  18. [0, 0, 0],
  19. ],
  20. [
  21. [0, 1, 0],
  22. [0, 1, 0],
  23. [0, 1, 1],
  24. ],
  25. [
  26. [0, 0, 0],
  27. [1, 1, 1],
  28. [1, 0, 0],
  29. ],
  30. [
  31. [1, 1, 0],
  32. [0, 1, 0],
  33. [0, 1, 0],
  34. ],
  35. ];
  36. }
  37. }