Open Ananth-Adhikarla opened 6 years ago
I have the same issue. Looks like the test is wrong - army_1 cannot win with 1 less Warrior??
Hello, the key of this is simple: 'initiative'. Said differently: after each fight, the order in which army is attacking the other is the key solution of what you see. The tests is OK.
I found the Sir Ronald challenges saga very entertaining, so I invested time to produce clean OOP solution, flexible and iteratively improved among each challenges, aiming to help interested people. If you are interested, you can check my solutions for each saga parts: The warriors, Army battles, The defenders, The vampires, The lancers, The healers, Straight fight, The weapons, The warlords.
I finished my code and all test cases are passed but I noticed an error in one of the test case and its not letting me finish the challenge as I have to skip it in order to proceed.
The condition was : In this case, the battle() function should return True, if the first army won, or False, if the second one was stronger.