-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmemyrinth_fr.multi
More file actions
234 lines (225 loc) · 12.6 KB
/
memyrinth_fr.multi
File metadata and controls
234 lines (225 loc) · 12.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
importer asyncio
déf memyrinth() utilise ui:
observer var niveau = 1
observer var nb_cartes = 16
observer var nb_colonnes = 4
observer var nb_paires = 8
observer var cartes = [1, 2, 3, 4, 5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
observer var revelees = [faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux]
observer var correspondantes = [faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux]
observer var premier_choix = -1
observer var deuxieme_choix = -1
observer var paires_trouvees = 0
observer var score = 0
observer var tentatives = 0
observer var temps_ecoule = 0
observer var en_verification = faux
observer var jeu_gagne = faux
observer var angle_rotation = 0
observer var paires_depuis_rotation = 0
observer var rotation_seuil = 3
observer var rotation_active = faux
observer var collision_active = faux
observer var indice_collision_1 = -1
observer var indice_collision_2 = -1
observer var besoin_melange = 0
asynchrone déf clic_carte(indice):
si en_verification ou correspondantes[indice] ou revelees[indice] ou indice >= nb_cartes:
retour
revelees[indice] = vrai
tentatives = tentatives + 1
si premier_choix == -1:
premier_choix = indice
sinon si premier_choix != indice:
deuxieme_choix = indice
en_verification = vrai
attendre asyncio.sleep(0.35)
si cartes[premier_choix] == cartes[deuxieme_choix]:
correspondantes[premier_choix] = vrai
correspondantes[deuxieme_choix] = vrai
paires_trouvees = paires_trouvees + 1
score = score + 10
si rotation_active:
paires_depuis_rotation = paires_depuis_rotation + 1
si paires_depuis_rotation >= rotation_seuil:
angle_rotation = (angle_rotation + 90) % 360
paires_depuis_rotation = 0
si paires_trouvees == nb_paires:
si niveau < 5:
attendre asyncio.sleep(0.2)
niveau = niveau + 1
si niveau == 2:
nb_cartes = 20
nb_colonnes = 5
nb_paires = 10
cartes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
sinon si niveau == 3:
nb_cartes = 24
nb_colonnes = 6
nb_paires = 12
rotation_active = vrai
angle_rotation = 0
paires_depuis_rotation = 0
rotation_seuil = 3
cartes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
sinon si niveau == 4:
nb_cartes = 30
nb_colonnes = 6
nb_paires = 15
cartes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 0, 0, 0, 0, 0, 0]
sinon si niveau == 5:
nb_cartes = 36
nb_colonnes = 6
nb_paires = 18
rotation_seuil = 2
cartes = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18]
revelees = [faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux]
correspondantes = [faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux]
premier_choix = -1
deuxieme_choix = -1
paires_trouvees = 0
besoin_melange = besoin_melange + 1
sinon:
jeu_gagne = vrai
sinon:
si niveau >= 4:
indice_collision_1 = premier_choix
indice_collision_2 = deuxieme_choix
collision_active = vrai
attendre asyncio.sleep(0.25)
collision_active = faux
indice_collision_1 = -1
indice_collision_2 = -1
revelees[premier_choix] = faux
revelees[deuxieme_choix] = faux
score = score - 1
premier_choix = -1
deuxieme_choix = -1
en_verification = faux
asynchrone déf reinitialiser_jeu():
premier_choix = -1
deuxieme_choix = -1
paires_trouvees = 0
score = 0
tentatives = 0
temps_ecoule = 0
en_verification = faux
angle_rotation = 0
paires_depuis_rotation = 0
collision_active = faux
revelees = [faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux]
correspondantes = [faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux, faux]
besoin_melange = besoin_melange + 1
render:
div class="memyrinth":
div class="entete":
h1: "MEMYRINTH"
p class="sous-titre":
si niveau == 1:
"Calibration Run"
sinon si niveau == 2:
"Pattern Expansion"
sinon si niveau == 3:
"Rotating Sector"
sinon si niveau == 4:
"Collision Pressure"
sinon:
"Full Maze"
p class="hero-copy":
si niveau < 3:
"Read the board calmly, memorize the numbers, and build momentum before the maze starts to drift."
sinon si niveau < 5:
"The maze now fights back. Keep your bearings as the board rotates and your errors become louder."
sinon:
"This is the complete maze. Track the whole board, survive the rapid rotations, and finish the run clean."
div class="panneau-mission":
div class="panneau-entete":
span class="panel-kicker": "Current Mission"
span class="difficulty-badge":
si niveau == 1:
"Calm Start"
sinon si niveau == 2:
"Pattern Build"
sinon si niveau == 3:
"Spatial Twist"
sinon si niveau == 4:
"Pressure Spike"
sinon:
"Full Chaos"
h2 class="mission-title":
si niveau < 5:
"Secure " + chaine(nb_paires) + " pairs to reach Level " + chaine(niveau + 1)
sinon:
"Lock all " + chaine(nb_paires) + " pairs to finish the maze"
p class="mission-copy":
si niveau == 1:
"The first sector teaches the rhythm. Accuracy matters more than speed."
sinon si niveau == 2:
"The board grows wider here. Scan in lanes and avoid wasting flips."
sinon si niveau == 3:
"Rotation begins after every " + chaine(rotation_seuil) + " successful matches."
sinon si niveau == 4:
"Wrong guesses create collisions. Stay precise and keep your mental map stable."
sinon:
"The final board is fully active, and the rotation accelerates. Commit to the pattern."
div class="progression":
div class="progression-meta":
span: "Progress"
span: chaine(paires_trouvees) + " / " + chaine(nb_paires) + " pairs"
div class="progression-barre":
si paires_trouvees == nb_paires:
div class="progression-remplissage progress-100": ""
sinon si paires_trouvees >= nb_paires / 2:
div class="progression-remplissage progress-50": ""
sinon si paires_trouvees >= nb_paires / 4:
div class="progression-remplissage progress-25": ""
sinon si paires_trouvees > 0:
div class="progression-remplissage progress-10": ""
sinon:
div class="progression-remplissage progress-0": ""
div class="mechanic-chip":
strong: "Mechanic"
span:
si niveau < 3:
"Classic memory board"
sinon si niveau == 3:
"Rotate every " + chaine(rotation_seuil) + " matches"
sinon si niveau == 4:
"Rotation plus collision effects"
sinon:
"Fast rotation every " + chaine(rotation_seuil) + " matches"
div class="status":
p:
si jeu_gagne:
"Run complete. You mastered the maze."
sinon si en_verification:
"Hold the pattern. Verifying the pair..."
sinon si paires_trouvees == nb_paires:
si niveau < 5:
"Sector cleared. Preparing Level " + chaine(niveau + 1)
sinon:
"Pick two cards and build a clean memory chain."
sinon si collision_active:
"Bad read. Re-center and track the revealed numbers."
sinon si rotation_active:
"Board rotates after " + chaine(rotation_seuil - paires_depuis_rotation) + " more matches."
sinon:
"Pick two cards and build a clean memory chain."
div class="plateau-shell":
div class="plateau" style=("grid-template-columns: repeat(" + chaine(nb_colonnes) + ", minmax(0, 1fr)); transform: rotate(" + chaine(angle_rotation) + "deg);"):
pour i dans intervalle(nb_cartes):
button class="carte"
class:matched=(correspondantes[i])
class:revealed=(revelees[i])
class:collision=(collision_active et (i == indice_collision_1 ou i == indice_collision_2))
disabled=(correspondantes[i] ou en_verification)
onclick=clic_carte(i):
si correspondantes[i]:
span class="carte-texte" style=("transform: rotate(" + chaine(0 - angle_rotation) + "deg);"): "OK"
sinon si revelees[i]:
span class="carte-texte" style=("transform: rotate(" + chaine(0 - angle_rotation) + "deg);"): chaine(cartes[i])
sinon:
span class="carte-texte" style=("transform: rotate(" + chaine(0 - angle_rotation) + "deg);"): "?"
div class="controles":
button class="reset-btn" onclick=reinitialiser_jeu(): "Restart Run"
memyrinth()