From 6c25f33f8748f6ffa09c1e5c3043fc6261d7170c Mon Sep 17 00:00:00 2001 From: julien <> Date: Thu, 10 Sep 2026 14:19:02 +0200 Subject: [PATCH] =?UTF-8?q?cr=C3=A9ation=20du=20combat=20principal?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- projet poo.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/projet poo.py b/projet poo.py index 9161875..f419199 100644 --- a/projet poo.py +++ b/projet poo.py @@ -49,8 +49,16 @@ class Personnage : for i in range(len(self.inv)) : print(f"- {self.inv[i]}") - - +def combat() : + perso1 = Personnage(input("Comment s'appelle le premier joueur ? "), input("Quelle est sa catégorie ? (guerrier, magicien, voleur, elfe) ")) + perso2 = Personnage(input("Comment s'appelle le second joueur ? "), input("Quelle est sa catégorie ? (guerrier, magicien, voleur, elfe) ")) + perso1.affiche_caracteristiques() + perso2.affiche_inventaire() + + + + +combat() corentin = Personnage("Corentin", "guerrier") xuan = Personnage("Xuan", "Elfe") \ No newline at end of file