Feature/advanced game mechanics #5
@@ -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