Ad
  • Custom User Avatar

    You had your console.logs inside whoWonput them at the start of declareWinner and you'll see the starting health of the fighters is never < 1.

  • Custom User Avatar

    both fighters will start out with negative health

    That's not true, you're printing the data after several rounds.

    Death is defined as having health <= 0.

    A dead fighter can't attack another. So there is always one winner.