Browse Source

Fixed start position

Arnaud Vergnet 4 years ago
parent
commit
3fe1d85eec
2 changed files with 5 additions and 6 deletions
  1. 1
    1
      screens/Tetris/GameLogic.js
  2. 4
    5
      screens/Tetris/Tetromino.js

+ 1
- 1
screens/Tetris/GameLogic.js View File

@@ -27,7 +27,7 @@ export default class GameLogic {
27 27
         this.height = height;
28 28
         this.width = width;
29 29
         this.gameRunning = false;
30
-        this.gameTick = 1000;
30
+        this.gameTick = 250;
31 31
         this.colors = colors;
32 32
     }
33 33
 

+ 4
- 5
screens/Tetris/Tetromino.js View File

@@ -22,11 +22,6 @@ export default class Tetromino {
22 22
             [0, 1, 0],
23 23
             [1, 1, 1],
24 24
         ],
25
-        20: [
26
-            [1, 0],
27
-            [1, 1],
28
-            [1, 0],
29
-        ],
30 25
         3: [
31 26
             [0, 1, 1],
32 27
             [1, 1, 0],
@@ -58,6 +53,10 @@ export default class Tetromino {
58 53
         this.currentShape = Tetromino.shapes[type];
59 54
         this.currentRotation = 0;
60 55
         this.position = {x: 0, y: 0};
56
+        if (this.currentType === Tetromino.types.O)
57
+            this.position.x = 4;
58
+        else
59
+            this.position.x = 3;
61 60
         this.colors = colors;
62 61
         Tetromino.colors = {
63 62
             0: colors.tetrisI,

Loading…
Cancel
Save