application-amicale/src/screens/Game/Shapes/ShapeO.js
2020-09-01 14:58:42 +02:00

57 lines
1.3 KiB
JavaScript

/*
* Copyright 2020 Arnaud Vergnet
*
* This file is part of CAMPUS.
*
* CAMPUS is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* CAMPUS is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with CAMPUS. If not, see <https://www.gnu.org/licenses/>.
*/
// @flow
import BaseShape from './BaseShape';
import type {CustomThemeType} from '../../../managers/ThemeManager';
import type {ShapeType} from './BaseShape';
export default class ShapeO extends BaseShape {
constructor(theme: CustomThemeType) {
super(theme);
this.position.x = 4;
}
getColor(): string {
return this.theme.colors.tetrisO;
}
// eslint-disable-next-line class-methods-use-this
getShapes(): Array<ShapeType> {
return [
[
[1, 1],
[1, 1],
],
[
[1, 1],
[1, 1],
],
[
[1, 1],
[1, 1],
],
[
[1, 1],
[1, 1],
],
];
}
}