mirror of
https://gitlab.com/lecarore/breakout71.git
synced 2025-06-15 18:54:47 -04:00
Fixed an issue with resizing and pacman level, changed ball attracts coins
This commit is contained in:
parent
83b9c0dec5
commit
183a11f989
10 changed files with 1837 additions and 1761 deletions
|
@ -1,6 +1,7 @@
|
|||
import _palette from "./data/palette.json";
|
||||
import _rawLevelsList from "./data/levels.json";
|
||||
import _appVersion from "./data/version.json";
|
||||
import {rawUpgrades} from "./upgrades";
|
||||
|
||||
describe("json data checks", () => {
|
||||
it("_rawLevelsList has icon levels", () => {
|
||||
|
@ -8,6 +9,14 @@ describe("json data checks", () => {
|
|||
_rawLevelsList.filter((l) => l.name.startsWith("icon:")).length,
|
||||
).toBeGreaterThan(10);
|
||||
});
|
||||
|
||||
it("all upgrades have icons", () => {
|
||||
const missingIcon = rawUpgrades.filter((u) => !_rawLevelsList.find(l=>l.name=='icon:'+u.id))
|
||||
expect(
|
||||
missingIcon,
|
||||
).toEqual([]);
|
||||
});
|
||||
|
||||
it("_rawLevelsList has non-icon few levels", () => {
|
||||
expect(
|
||||
_rawLevelsList.filter((l) => !l.name.startsWith("icon:")).length,
|
||||
|
@ -29,6 +38,18 @@ describe("json data checks", () => {
|
|||
it("Has a few colors", () => {
|
||||
expect(Object.keys(_palette).length).toBeGreaterThan(10);
|
||||
});
|
||||
it("Avoids dark bricks on dark bg", () => {
|
||||
const levelsWithDarkBricksAndBG = _rawLevelsList
|
||||
.filter(l=>!l.color && !l.name.match(/^icon:/))
|
||||
.map(l=>({
|
||||
name:l.name,
|
||||
bricks:l.bricks.split('').filter(c=>c!=='_').length,
|
||||
darkBricks:l.bricks.split('').filter(c=>c==='g').length,
|
||||
}))
|
||||
.filter(l=>l.darkBricks>0.05*l.bricks)
|
||||
|
||||
expect(levelsWithDarkBricksAndBG).toEqual([]);
|
||||
});
|
||||
it("Has an _appVersion", () => {
|
||||
expect(parseInt(_appVersion)).toBeGreaterThan(2000);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue