bug fixed

This commit is contained in:
2026-02-19 14:46:25 +01:00
parent 4e7a9fdee7
commit f9d3a537c0
3 changed files with 6 additions and 5 deletions
Vendored
BIN
View File
Binary file not shown.
+2 -2
View File
@@ -187,8 +187,8 @@ button:disabled { opacity: 0.3; cursor: not-allowed; }
border: 1px solid var(--border);
border-radius: 6px;
padding: 14px 20px;
margin-top: 0px; /* plus bas */
margin-left: -800px; /* vers la gauche */
margin-top: -250px; /* plus bas */
margin-left: -600px; /* vers la gauche */
box-shadow: 0 0 20px rgba(0,255,231,0.05);
position: relative;
z-index: 1;
+3 -2
View File
@@ -47,6 +47,7 @@ class Tetris {
this.isPaused = false;
this.grid = this._createGrid(10, 20);
this.score = 0;
this.count = 0;
this.timeToDown = this.initialTimeToDown;
this.storedPiece = null;
this.canStore = true;
@@ -98,7 +99,7 @@ class Tetris {
this.lastTime = currentTime;
this.accumulator += deltaTime;
while (this.accumulator >= this.timeToDown) {
while (this.isRunning && this.accumulator >= this.timeToDown) {
this._tick();
this.accumulator -= this.timeToDown;
if (this.accumulator > this.timeToDown * 3) {
@@ -270,7 +271,7 @@ class Tetris {
_makeHarder() {
if (this.count >= this.hardening) {
this.count = 0;
this.timeToDown -= this.decrementTTD;
this.timeToDown = Math.max(100, this.timeToDown - this.decrementTTD);
}
}