From 65368c81955ad60a5b73d57ea555a42d5cefb9db Mon Sep 17 00:00:00 2001 From: Sacha <> Date: Thu, 19 Sep 2024 11:52:15 +0200 Subject: [PATCH] bientot --- miniP1.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/miniP1.py b/miniP1.py index 2bd4359..afe9bdc 100644 --- a/miniP1.py +++ b/miniP1.py @@ -73,14 +73,16 @@ def game(): Player_2_cat = "Un magnifique Elfe" print ("Bien que votre souhait sois exaucé vous etes un" ,Player_2_cat) - player_1 = Personnage (Player_1_nom, Player_1_cat) - player_2 = Personnage (Player_2_nom, Player_2_cat) + Player_1 = Personnage (Player_1_nom, Player_1_cat) + Player_2 = Personnage (Player_2_nom, Player_2_cat) - while player_1.pdv > 0 and player_2.pdv > 0 : +def tour (): + while Player_1.pdv > 0 and player_2.pdv > 0 : PL1_A = player_1.jet_attaque() PL2_D = player_2.jet_defence() - + if PL1_A > PL2_D: + Player_1.change_pdv(-randint(1,8))