Fixed start position

This commit is contained in:
Arnaud Vergnet 2020-03-16 08:22:18 +01:00
parent a32294e394
commit 3fe1d85eec
2 changed files with 5 additions and 6 deletions

View file

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

View file

@ -22,11 +22,6 @@ export default class Tetromino {
[0, 1, 0],
[1, 1, 1],
],
20: [
[1, 0],
[1, 1],
[1, 0],
],
3: [
[0, 1, 1],
[1, 1, 0],
@ -58,6 +53,10 @@ export default class Tetromino {
this.currentShape = Tetromino.shapes[type];
this.currentRotation = 0;
this.position = {x: 0, y: 0};
if (this.currentType === Tetromino.types.O)
this.position.x = 4;
else
this.position.x = 3;
this.colors = colors;
Tetromino.colors = {
0: colors.tetrisI,