@dinglemouse it is really nice solution to this Kata. I've come up with 70 lines of code comparing to yours 10
No. The return the only way out of the loop. The while (true) is OK only because a death of a fighter is guaranteed by the rules of this Kata which says initial health and damage values of each fighter are > 0. In other word somebody must die.
return
while (true)
This comment is hidden because it contains spoiler information about the solution
Loading collection data...
@dinglemouse it is really nice solution to this Kata. I've come up with 70 lines of code comparing to yours 10
No. The
return
the only way out of the loop. Thewhile (true)
is OK only because a death of a fighter is guaranteed by the rules of this Kata which says initial health and damage values of each fighter are > 0. In other word somebody must die.This comment is hidden because it contains spoiler information about the solution