From 274cc93c550c0014dda643f37da5b77aff8f3286 Mon Sep 17 00:00:00 2001 From: Ilia Mashkov Date: Sat, 18 Jul 2026 13:14:47 +0300 Subject: [PATCH] =?UTF-8?q?feat:=20=D0=94=D0=BE=D0=B1=D0=B0=D0=B2=D0=BB?= =?UTF-8?q?=D0=B5=D0=BD=D0=B0=20=D0=B1=D0=B0=D0=B7=D0=BE=D0=B2=D0=B0=D1=8F?= =?UTF-8?q?=20=D0=BB=D0=BE=D0=B3=D0=B8=D0=BA=D0=B0=20=D0=B2=D1=8B=D0=B8?= =?UTF-8?q?=D0=B3=D1=80=D1=8B=D1=88=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/game.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/game.js b/src/game.js index b6cfa4b..3ea8d1f 100644 --- a/src/game.js +++ b/src/game.js @@ -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'; + } } }