diff --git a/screens/Tetris/GameLogic.js b/screens/Tetris/GameLogic.js
index cacda8f..c93c4d0 100644
--- a/screens/Tetris/GameLogic.js
+++ b/screens/Tetris/GameLogic.js
@@ -25,7 +25,7 @@ export default class GameLogic {
this.height = height;
this.width = width;
this.gameRunning = false;
- this.gameTick = 250;
+ this.gameTick = 1000;
}
getHeight(): number {
diff --git a/screens/Tetris/components/Cell.js b/screens/Tetris/components/Cell.js
index 6ebb28e..a3fd525 100644
--- a/screens/Tetris/components/Cell.js
+++ b/screens/Tetris/components/Cell.js
@@ -4,18 +4,37 @@ import * as React from 'react';
import {View} from 'react-native';
import {withTheme} from 'react-native-paper';
-function Cell(props) {
- const colors = props.theme.colors;
- return (
-
- );
+type Props = {
+ color: string,
+ isEmpty: boolean,
+ id: string,
+}
+
+class Cell extends React.PureComponent {
+
+ colors: Object;
+
+ constructor(props) {
+ super(props);
+ this.colors = props.theme.colors;
+ }
+
+ render() {
+ return (
+
+ );
+ }
+
+
}
export default withTheme(Cell);
diff --git a/screens/Tetris/components/Grid.js b/screens/Tetris/components/Grid.js
index 5acaa26..19be7f9 100644
--- a/screens/Tetris/components/Grid.js
+++ b/screens/Tetris/components/Grid.js
@@ -25,7 +25,8 @@ class Grid extends React.Component{
let cells = [];
for (let i = 0; i < this.props.width; i++) {
let cell = this.props.grid[rowNumber][i];
- cells.push();
+ let key = rowNumber + ':' + i;
+ cells.push();
}
return(
| |