From 9880c22da87ed8c9372839611d6288909d39197f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?DELPUI=20Lo=C3=AFc?= Date: Wed, 13 Dec 2023 11:53:03 +0100 Subject: [PATCH] UwuWu MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1ère interface graphique --- projet bataille.py | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/projet bataille.py b/projet bataille.py index 1a5d5ad..0b96289 100644 --- a/projet bataille.py +++ b/projet bataille.py @@ -15,7 +15,6 @@ class Carte: class Jeux: def __init__ (self, nbr_cartes): - #self.window = Tk() self.nb = nbr_cartes if self.nb != 32 and self.nb != 52: raise ValueError("Choisissez 32 ou 52 cartes") @@ -34,6 +33,23 @@ class Jeux: for player in players: player.enfiler(self.paquet.pop(0)) +def click(event): + print("ok") + +window = Tk() +window.title("Bataille") +window.geometry(f"700x400+300+200") + +canvas = Canvas(window, width = 650, height = 300, background = "#fff") +canvas.place(x = 25, y = 50) + +player1_pack = canvas.create_rectangle(50, 100, 150, 250, fill = "#f77") +player1_carte = canvas.create_rectangle(200, 75, 300, 225, fill = "#fff") + +player2_pack = canvas.create_rectangle(500, 100, 600, 250, fill = "#f77") +player2_carte = canvas.create_rectangle(350, 75, 450, 225, fill = "#fff") + +canvas.bind("