feat: Добавлена базовая логика выигрыша
This commit is contained in:
1 parent
fea05e6b97
commit
274cc93c55
1 file changed
+6
@@ -57,5 +57,11 @@ export class Game {
|
||||
this.ball.reset();
|
||||
}
|
||||
}
|
||||
|
||||
const isAnyBrickAlive = this.bricks.some((row) => row.some((brick) => brick.alive));
|
||||
|
||||
if (!isAnyBrickAlive) {
|
||||
this.status = 'completed';
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user