Open nvatuan opened 8 months ago
level_rules
and for checking if a placement is validA = { "color": 'red', "number": 3 }
B = { "color": 'red', "number": 1 }
C = { "color": 'blue', "number": 3 }
D = { "color": 'blue', "number": 7 }
[B][?][?][D]
which mean B
and D
card is locked and we cannot move it.[B][A][C][D]
. We can only place it like that.[{ "color": 'red', "number": 3 }, { "color": 'blue', "number": 3 }, { "color": 'red', "number": 1 }, { "color": 'blue', "number": 7 }]
"color,number"
Next We can either specify:
Or specify layout:
['R1', None, None, 'B7']
free_cards = [
{ "color": 'red', "number": 3 }, { "color": 'blue', "number": 3 }
]
level_layout = [
[
{ "color": 'red', "number": 1 }, # locked card
None,
None,
{ "color": 'blue', "number": 7 }, # locked card
]
]
Here I propose a level generator for the game. The goal is too:
1. Maker can generate levels with
difficulty
parameter2. Maker can generate levels with starter cards.
3. Level size
1D
or2D
.level_size[] = {4}
it means it has 1D, and 4 card slots.level_size[] = {"<4"}
which mean a row of not over 4 slots maybe eazier for the generator implementation.P/S