Build 29060255

This commit is contained in:
Renan LE CARO 2025-04-02 19:36:03 +02:00
parent 5ce309d59f
commit b7dacaba0a
11 changed files with 143 additions and 184 deletions

View file

@ -234,28 +234,15 @@ export function shouldPierceByColor(
return true;
}
// export function countBricksAbove(gameState: GameState, index: number) {
// const col = index % gameState.gridSize;
// const row = Math.floor(index / gameState.gridSize);
// let count = 0;
// for (let y = 0; y < row; y++) {
// if (gameState.bricks[col + y * gameState.gridSize]) {
// count++;
// }
// }
// return count;
// }
// export function countBricksBelow(gameState: GameState, index: number) {
// const col = index % gameState.gridSize;
// const row = Math.floor(index / gameState.gridSize);
// let count = 0;
// for (let y = row + 1; y < gameState.gridSize; y++) {
// if (gameState.bricks[col + y * gameState.gridSize]) {
// count++;
// }
// }
// return count;
// }
export function isMovingWhilePassiveIncome(gameState: GameState) {
return !!(
gameState.lastPuckMove &&
gameState.perks.passive_income &&
gameState.lastPuckMove >
gameState.levelTime - 250 * gameState.perks.passive_income
);
}
export function highScoreForMode(mode: GameState["mode"]) {
try {
const score = parseInt(