fight(perso1, perso2) {
        let end = false;

        perso1.getCaracteristique();
        perso2.getCaracteristique();


        while (!end) {
            let firstPlayer = this.startFight(perso1, perso2);

            let player1 = firstPlayer.player1;
            let player2 = firstPlayer.player2;


            player1.fightTour(player2);

            end = this.endGame(player1, player2);
        }
    }
// Gestion d'un combat entier
Gestion d'un combat entier
Gestion d ' un combat entier
fight(perso1, perso2) {
        let end = false;
        perso1.getCaracteristique();
        perso2.getCaracteristique();
        while (!end) {
            let firstPlayer = this.startFight(perso1, perso2);
            let player1 = firstPlayer.player1;
            let player2 = firstPlayer.player2;
            player1.fightTour(player2);
            end = this.endGame(player1, player2);
        }
    }
fight ( perso1 , perso2 ) { let end = false ; perso1 . getCaracteristique ( ) ; perso2 . getCaracteristique ( ) ; while ( ! end ) { let firstPlayer = this . startFight ( perso1 , perso2 ) ; let player1 = firstPlayer . player1 ; let player2 = firstPlayer . player2 ; player1 . fightTour ( player2 ) ; end = this . endGame ( player1 , player2 ) ; } }
Gestion d'un combat entier
Gestion d ' un combat entier