application-amicale/screens/Tetris/Shapes/ShapeO.js

40 lines
668 B
JavaScript
Raw Normal View History

2020-03-23 11:32:50 +01:00
// @flow
import BaseShape from "./BaseShape";
export default class ShapeO extends BaseShape {
#colors: Object;
constructor(colors: Object) {
super();
this.position.x = 4;
this.#colors = colors;
}
getColor(): string {
return this.#colors.tetrisO;
}
getShapes() {
return [
[
[1, 1],
[1, 1],
],
[
[1, 1],
[1, 1],
],
[
[1, 1],
[1, 1],
],
[
[1, 1],
[1, 1],
],
];
}
}