Added a palette for bricks color

This commit is contained in:
Renan LE CARO 2025-03-03 22:14:28 +01:00
parent 0622e63eb5
commit 8c4735f3f2
4 changed files with 27 additions and 24 deletions

View file

@ -23,6 +23,7 @@ const randomPatterns=[
]
let attributed=0
allLevels.forEach(l => {
l.bricks=l.bricks.split('').map(c=>palette[c])
if (!l.color && !l.svg) {
l.svg = randomPatterns[attributed%randomPatterns.length]
attributed++
@ -87,7 +88,7 @@ function resetCombo(x, y) {
type: "text",
text: "-" + lost,
time: levelTime,
color: "red",
color: "r",
x: x,
y: y,
duration: 150,
@ -110,7 +111,7 @@ function decreaseCombo(by, x, y) {
type: "text",
text: "-" + lost,
time: levelTime,
color: "red",
color: "r",
x: x,
y: y,
duration: 300,

View file

@ -260,9 +260,9 @@ let allLevels=[
"focus": false
},
{
"name": "Greed",
"name": "Dollar",
"size": 17,
"bricks": "________________________k_k______________k_k____________kkkkkkk_________kkkkkkkkk_______kk__k_k__kk______kk__k_k__kk______kk__k_k___________kkkkkkkk__________kkkkkkkk___________k_k__kk______kk__k_k__kk______kk__k_k__kk_______kkkkkkkkk_________kkkkkkk____________k_k______________k_k________________________",
"bricks": "________________________G_G______________G_G____________GGGGGGG_________GGGGGGGGG_______GG__G_G__GG______GG__G_G__GG______GG__G_G___________GGGGGGGG__________GGGGGGGG___________G_G__GG______GG__G_G__GG______GG__G_G__GG_______GGGGGGGGG_________GGGGGGG____________G_G______________G_G________________________",
"svg": "",
"color": "",
"focus": false
@ -414,7 +414,7 @@ let allLevels=[
{
"name": "B71",
"size": 10,
"bricks": "__________rrryyyy_r_r__r__yrr_r__r__y_r_rrr__y__r_r__r_y__r_r__ry___r_rrr_y__rrr__________",
"bricks": "__________bbbtttt_b_b__b__tbb_b__b__t_b_bbb__t__b_b__b_t__b_b__bt___b_bbb_t__bbb__________",
"svg": "",
"focus": false
},