Application Android et IOS pour l'amicale des élèves
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.

ShapeZ.js 800B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. // @flow
  2. import BaseShape from "./BaseShape";
  3. export default class ShapeZ 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.tetrisZ;
  12. }
  13. getShapes() {
  14. return [
  15. [
  16. [1, 1, 0],
  17. [0, 1, 1],
  18. [0, 0, 0],
  19. ],
  20. [
  21. [0, 0, 1],
  22. [0, 1, 1],
  23. [0, 1, 0],
  24. ],
  25. [
  26. [0, 0, 0],
  27. [1, 1, 0],
  28. [0, 1, 1],
  29. ],
  30. [
  31. [0, 1, 0],
  32. [1, 1, 0],
  33. [1, 0, 0],
  34. ],
  35. ];
  36. }
  37. }