Skip to content

Commit

Permalink
petits changements
Browse files Browse the repository at this point in the history
  • Loading branch information
Jerem-EstIcI committed Apr 22, 2024
1 parent c78a3b7 commit 5058456
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,16 @@
canvas.pack()

def affiche_lab():
'''
Affiche le labyrinthe sur l'application tkinter
'''
dim=25 # dimension du labyrinthe (max lisible 101)
dimcanva=500/dim

gen = GenLab(dim) # GenLab(dimension)
labyrinthe = gen.dessine_lab()


canvas.config(width=len(labyrinthe[0]) * dimcanva, height=len(labyrinthe) * dimcanva)
canvas.delete("all") # Effacer tout ce qui est dessiné précédemment sur le canvas

Expand All @@ -37,6 +42,8 @@ def affiche_lab():
canvas.create_rectangle(j * dimcanva, i * dimcanva, (j + 1) * dimcanva, (i + 1) * dimcanva, fill="white")




gen_button = tk.Button(button_frame, text="Générer Labyrinthe", command=affiche_lab)
gen_button.pack(side=tk.LEFT, padx=5, pady=5)

Expand Down

0 comments on commit 5058456

Please sign in to comment.