Ad
  • Custom User Avatar

    Calculate the distance between the first and the last pillar in centimeters (without the width of the first and last pillar).

    I don't know where you see this:

    If you meant to measure from the center of the pillars, or to the far edges of the pillars, you need to indicate that.

    Because that's not what you should do. Not a kata issue.

    The current instructions can be read as return the sum of the distances between the first and the last pillar and the width of the pillars (if there is any) in between. Moreover, if you ignore the width of the first and last pillar, it means consider them 0, left, center or right are the same position.

  • Custom User Avatar

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

  • Default User Avatar

    do not redefine the Fighter class, it is preloaded for you. redefining it tampers with the tests, which should not happen. re-raised an issue about that above with a proposed fix

  • Default User Avatar

    JavaScripts tests are vulnerable to (possibly accidental) redefinition of the fighter class.
    fixed here along with:

    • better assertion messages
    • using a modern JS class for the Fighters
  • Custom User Avatar
  • Custom User Avatar

    Passing all the sample tests, then failing one of the random 200 tests. The description and parameters aren't clear enough to figure out what's causing the failed test, and there's no way to view the failed test on Codewars (like you can on other platforms).