Ad
  • Custom User Avatar

    Resolved in latest fork.

  • Custom User Avatar

    I've forked and done a major rework of this kata, waiting for review here:

    https://www.codewars.com/kumite/651df75aefd0b637976a502a

    Included:

    • Enabled Node v18.x
    • Refactored to use Chai/Mocha test assertions
    • Added a fixed test case with uneven tactics lengths where both lengths are > 0
    • Replaced the old random test generator which only randomised health and speed with one that:
      • Randomises health and speed
      • Samples from a broader and more varied set of tactics for each fight
      • Generates robots with variable numbers of tactics, rather than re-using identical tactics for every robot in every random fight
    • Fixed the (obviously) broken reference solution; the only reason it appeared to work was a paucity of tests
    • Updated the description a touch

    I believe this addresses all open issues for JS on this kata. I also believe it's going to invalidate a few existing solutions, but (hopefully) that's only because neither they nor the old test harness actually fit the requirements.

  • Custom User Avatar

    The underlying issue is that the "random" tests are only testing random health and speed values, and there are no fixed tests with unequal-but-not-zero tactics lengths. I'll fork and correct this now.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution