Has anyone done this before? Modify your BattleManager class Add a method called
ID: 3713472 • Letter: H
Question
Has anyone done this before? Modify your BattleManager class Add a method called battle. This method takes, as parameters, 2 heroes and a number of rounds to fight. Your battle method should use a loop to run the round methods, with the heroes as input to round. Battle should return the hero with the most health after all rounds have completed. You can handle a tie how ever you like AS LONG AS A HERO OBJECT YOU CONSIDER THE WINNER IS RETURNED Add a method called tournament. This method takes, as parameters, an array of heroes. This method runs a single elimination tournament on all the heroes. The method should call the battle method for pairs of heroes in the array. Each battle in the tournament lasts for 3 rounds. After the tournament has completed, return the hero object that is the winner of the entire tournament Test your changes to the battle manager by creating a main class that Creates a battle manager Creates 2 heroes and battle them for 5 rounds. using the battle method. Creates an array of 5 hero objects call the tournament method with your array