If in the end of the turn the first warrior has > 0 health and the other one doesn’t, the function should return True, in the other case it should return False.
If fight() function should return result of one turn, it won't get to True in the first round.
If fight() function goes on until one of the warriors is dead, it will never return False.
Why is asserting
fight(chuck, bruce) == True
fight(dave, carl) == False
?
Created at: 2019/01/16 04:13; Updated at: 2019/03/25 16:05
The question is resolved.