As I said elsewhere, I can't make any sense of this task. Let's try to ask questions here. @bsquare said they could probably help me. Here are few things I have problem with.
every turn one of the warriors will hit another one and the last will lose his health in the same value as the attack of the first warrior. After that, the second warrior will do the same to the first one.
If in the end of the turn
One interpretation is that a turn is "first hits second, then second hits first" (like in chess). The other is that the above is two turns. (Neither one works IMO, but that's my first dilemma.)
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.
Does this really mean "the end of the turn"? (No.:) It probably means "the end of the fight". (It should also be corrected, of course.) But how is the end of the fight determined? If the fight only ends "if first has >0 health", then it might never end. Of course, it probably means "if either player has positive health (and the other one doesn't)", but it still might never end (what if both are at zero?).
So, I need a precise definition of a turn, and a precise definition of end condition. For starters. :-)
Created at: 2019/08/30 11:36; Updated at: 2019/11/10 03:14