Skip to content

Commit ef5f583

Browse files
committed
format
1 parent c7f5144 commit ef5f583

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

game11/harry_potter.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
r"C:\Users\alema\Desktop\pythonbiella\LearningPythonWithGames\game11\spells.csv"
3333
)
3434

35+
3536
def ottieni_opzioni(personaggio):
3637
"""Filtra il DataFrame per ottenere solo gli incantesimi di un personaggio specifico."""
3738
return incantesimi_df.filter(pl.col("character") == personaggio)
@@ -154,6 +155,7 @@ def prepara_harry():
154155
opzioni_correnti = ottieni_opzioni("Harry").sample(4)
155156
attesa_input = True
156157

158+
157159
def on_mouse_down(pos):
158160
"""Gestisce il click del mouse sulle opzioni degli incantesimi."""
159161
global attesa_input
@@ -263,8 +265,11 @@ def disegna_menu():
263265
x, y = 40 + (i % 2) * 380, 440 + (i // 2) * 60
264266
screen.draw.rect(Rect((x, y), (350, 50)), "white")
265267
screen.draw.text(
266-
f"> {opzioni_correnti[i, 'spell'].upper()}", (x + 20, y + 15), fontsize=30
268+
f"> {opzioni_correnti[i, 'spell'].upper()}",
269+
(x + 20, y + 15),
270+
fontsize=30,
267271
)
268272

273+
269274
prepara_harry()
270275
pgzrun.go()

0 commit comments

Comments
 (0)