diff --git a/__pycache__/File.cpython-38.pyc b/__pycache__/File.cpython-38.pyc new file mode 100644 index 0000000..16b0257 Binary files /dev/null and b/__pycache__/File.cpython-38.pyc differ diff --git a/__pycache__/Pile.cpython-38.pyc b/__pycache__/Pile.cpython-38.pyc new file mode 100644 index 0000000..3a35089 Binary files /dev/null and b/__pycache__/Pile.cpython-38.pyc differ diff --git a/__pycache__/listeChaine.cpython-38.pyc b/__pycache__/listeChaine.cpython-38.pyc new file mode 100644 index 0000000..0a12fcb Binary files /dev/null and b/__pycache__/listeChaine.cpython-38.pyc differ diff --git a/interface.py b/interface.py index 60f1094..fd4ab71 100644 --- a/interface.py +++ b/interface.py @@ -1,9 +1,13 @@ import tkinter as tk from tkinter import messagebox - +from random import choice, randint from PIL import Image - +pique = "🂡🂢🂣🂤🂥🂦🂧🂨🂩🂪🂫🂬🂭🂮" +coeur = '🂱🂲🂳🂴🂵🂶🂷🂸🂹🂺🂻🂼🂽🂾' +carreau = "🃁🃂🃃🃄🃅🃆🃇🃈🃉🃊🃋🃌🃍🃎" +trefle = "🃑🃒🃓🃔🃕🃖🃗🃘🃙🃚🃛🃜🃝🃞" +cartes = pique + coeur + carreau + trefle class Interface(tk.Frame): def __init__(self, master): @@ -12,15 +16,21 @@ class Interface(tk.Frame): self.grid(row=0) #revoir le design self.menu = tk.Frame() - title = tk.Label(self.menu, text="Bataille",font=("eufm10", 42)) - title.grid(row=0) - #image ne fonctionne pas - canvas= tk.Canvas(self.menu, width= 300, height=300) - image = tk.PhotoImage(file='title_img.gif') - canvas.create_image(50, 10, image=image) - canvas.grid(row=2) + C = tk.Canvas (self.menu, bg="black",height=250, width=300) + coord = 10, 50, 240, 210 + C.grid(row=0) + #image ne fonctionne pas + #canvas= tk.Canvas(self.menu, width= 300, height=300) + #image = tk.PhotoImage(file='title_img.png') + #canvas.create_image(50, 10, image=image) + #canvas.grid(row=2) + for i in range(20): + C.create_text(randint(0,300),randint(0,250),fill="white",font="Times 20 italic bold",text=choice(cartes)) + + titre = tk.Label(self.menu, text="Bataille",bg="grey", fg="white",font=("eufm10", 42)) + titre.grid(row=0) @@ -42,7 +52,7 @@ class Interface(tk.Frame): if __name__ == "__main__": root = tk.Tk() - root.title("Hello World!") + root.title("Bataille") root.geometry("300x300") hello_frame = Interface(root) hello_frame.mainloop()