Hello, all!
My solution fails at test 21
army_1 = Army()
army_2 = Army()
army_1.add_units(Lancer, 7)
army_1.add_units(Vampire, 3)
army_1.add_units(Healer, 1)
army_1.add_units(Warrior, 4)
army_1.add_units(Healer, 1)
army_1.add_units(Defender, 2)
army_2.add_units(Warrior, 4)
army_2.add_units(Defender, 4)
army_2.add_units(Healer, 1)
army_2.add_units(Vampire, 6)
army_2.add_units(Lancer, 4)
battle = Battle()
battle.straight_fight(army_1, army_2)
Your result:
true
Right result:
false
This message is nowhere near enough to understand what exactly is going wrong. I've tried to understand where is the problem, but it's not something obvious as long as I passed all the previous tests.
Has anyone faced the same issue? I think it would be a lot more informative if we were provided with health of every unit in every army after the battle than just simple True or False.
Created at: April 4, 2019, 7:13 a.m.; Updated at: Dec. 21, 2020, 7:23 p.m.
The question is resolved.