1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- // @flow
-
- import BaseShape from "./BaseShape";
-
- export default class ShapeI extends BaseShape {
-
- #colors: Object;
-
- constructor(colors: Object) {
- super();
- this.position.x = 3;
- this.#colors = colors;
- }
-
- getColor(): string {
- return this.#colors.tetrisI;
- }
-
- getShapes() {
- return [
- [
- [0, 0, 0, 0],
- [1, 1, 1, 1],
- [0, 0, 0, 0],
- [0, 0, 0, 0],
- ],
- [
- [0, 0, 1, 0],
- [0, 0, 1, 0],
- [0, 0, 1, 0],
- [0, 0, 1, 0],
- ],
- [
- [0, 0, 0, 0],
- [0, 0, 0, 0],
- [1, 1, 1, 1],
- [0, 0, 0, 0],
- ],
- [
- [0, 1, 0, 0],
- [0, 1, 0, 0],
- [0, 1, 0, 0],
- [0, 1, 0, 0],
- ],
- ];
- }
- }
|