In test number 5:
army1 = Army()
army2 = Army()
army1.addunits(Warrior, 10)
army2.addunits(Warrior, 11)
battle = Battle()
battle.fight(army1, army2)
Your result:
false
Right result:
true
Pardon me if I'm wrong but the right result should be false since the first army will not survive against a bigger army, even if it attacks first. and the function returns True only if the first army wins.
Created at: 2018/12/07 04:51; Updated at: 2022/08/24 17:30