mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-05-05 03:07:14 -04:00
wip
This commit is contained in:
parent
e78021ff83
commit
156c060b96
4 changed files with 51 additions and 39 deletions
|
@ -13,8 +13,7 @@ const rawLevelsList = _rawLevelsList as RawLevel[];
|
|||
export const appVersion = _appVersion as string;
|
||||
|
||||
export const icons = {} as { [k: string]: string };
|
||||
|
||||
export const allLevels = rawLevelsList
|
||||
export const allLevelsAndIcons = rawLevelsList
|
||||
.map((level, i) => {
|
||||
const bricks = level.bricks
|
||||
.split("")
|
||||
|
@ -32,12 +31,15 @@ export const allLevels = rawLevelsList
|
|||
svg: getLevelBackground(level),
|
||||
};
|
||||
})
|
||||
.filter((l) => !l.name.startsWith("icon:"))
|
||||
.map((l, li) => ({
|
||||
...l,
|
||||
sortKey: ((Math.random() + 3) / 3.5) * l.bricksCount,
|
||||
})) as Level[];
|
||||
|
||||
export const allLevels =
|
||||
allLevelsAndIcons.filter((l) => !l.name.startsWith("icon:"))
|
||||
|
||||
|
||||
export const upgrades = rawUpgrades.map((u) => ({
|
||||
...u,
|
||||
icon: icons["icon:" + u.id],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue