mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-06-16 19:25:06 -04:00
Build 29060255
This commit is contained in:
parent
5ce309d59f
commit
b7dacaba0a
11 changed files with 143 additions and 184 deletions
|
@ -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(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue