Skip to content

Commit

Permalink
Don't inflate tiles from current game
Browse files Browse the repository at this point in the history
  • Loading branch information
deitrix committed Apr 6, 2024
1 parent 7ecd946 commit 662e988
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -363,20 +363,17 @@ <h2>Game over!</h2>
const y = Math.floor(i / 4);

const el = document.createElement('div')
el.classList.add("cell", "spawning")
el.classList.add("cell")
el.textContent = `${val}`
el.style.left = `${x * 105 + (x + 1) * 16}px`;
el.style.top = `${y * 105 + (y + 1) * 16}px`;
el.style.scale = '0';
el.style.color = fgColours[val];
el.style.backgroundColor = bgColours[val];
el.style.fontSize = fontSizes[val];

cells[i] = val
cellElems[i] = el
gameContainer.appendChild(el)
el.offsetHeight;
el.style.scale = '1';
}
} else {
spawnRandomTiles(2)
Expand Down

0 comments on commit 662e988

Please sign in to comment.