12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- // @flow
-
- import BaseShape from './BaseShape';
- import type {CustomThemeType} from '../../../managers/ThemeManager';
- import type {ShapeType} from './BaseShape';
-
- export default class ShapeI extends BaseShape {
- constructor(theme: CustomThemeType) {
- super(theme);
- this.position.x = 3;
- }
-
- getColor(): string {
- return this.theme.colors.tetrisI;
- }
-
- // eslint-disable-next-line class-methods-use-this
- getShapes(): Array<ShapeType> {
- 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],
- ],
- ];
- }
- }
|