Major rework of basic game code - pre-work for multiplayer
Includes automatic generation of required HTML elements and better responsiveness
This commit is contained in:
@@ -23,14 +23,9 @@ class Arena {
|
||||
this.field.unshift(row);
|
||||
++y;
|
||||
|
||||
this.p.score += rowCount * 10;
|
||||
this.p.score += rowCount * 20;
|
||||
rowCount *= 2;
|
||||
}
|
||||
if (this.p.score - this.g.prevUpdateScore > 50) {
|
||||
this.g.dropInterval -= 20;
|
||||
this.g.dropInterval = this.g.dropInterval > 100 ? this.g.dropInterval : 100;
|
||||
this.g.prevUpdateScore = this.p.score;
|
||||
}
|
||||
this.game.drawArena();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user