mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-06-16 19:25:06 -04:00
Build 29126551
This commit is contained in:
parent
4c135968e0
commit
810df5962a
20 changed files with 295 additions and 69 deletions
|
@ -355,3 +355,14 @@ export function zoneLeftBorderX(gameState: GameState) {
|
|||
export function zoneRightBorderX(gameState: GameState) {
|
||||
return gameState.canvasWidth - gameState.offsetXRoundedDown + 1;
|
||||
}
|
||||
|
||||
let countsCounterSet: Record<string, number> = {};
|
||||
export function countBrickColors(gameState: GameState) {
|
||||
for (let key in countsCounterSet) {
|
||||
countsCounterSet[key] = 0;
|
||||
}
|
||||
gameState.bricks.forEach((brick) => {
|
||||
if (brick && brick !== "black") countsCounterSet[brick] = 1;
|
||||
});
|
||||
return sumOfValues(countsCounterSet);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue