add ball with click but remove oldest dot when limit reached

This commit is contained in:
2026-01-21 18:52:03 +01:00
parent fb917d56e6
commit e87dd76626

View File

@@ -96,7 +96,7 @@ export class DotBackground implements OnDestroy {
private spawnDot(): Dot {
const dotId = this.ballSpawnId++;
let dot;
if (this.ballSpawnId < this.MAX_DOT_COUNT) {
if (dotId < this.MAX_DOT_COUNT) {
dot = {
x: 0,
y: 0,