Ad
  • Default User Avatar

    it's listed under the 'debugging' tag, which means the code is bad and needs to be fixed.

  • Custom User Avatar

    Given that the task is very specific I'd say it is, as it is performant and the code is readable.

    If you had to, for example, generate neighbors up to a variable distance n received as a parameter of the function, that would be a different story.

  • Default User Avatar

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

  • Custom User Avatar

    Wonder if this is really a best practice, although it completely satisfies the task... Well done.

  • Custom User Avatar

    Well, the kata description already says so: 'Something is wrong with our Warrior class.' — And, indeed, it is.
    The initial Ruby code is pretty bad, too. (And not only because it doesn't work [correctly or not].)

  • Custom User Avatar

    Fixed both issues

  • Custom User Avatar

    I'm pretty sure it's against good practices in all languages, but hey.. you should be able to deal with this kind of code in a software development team since not everyone are experienced

  • Custom User Avatar

    Is it possible to flag this?

    It hurs my eyes. The default class implentation is agains every python rules, which is a shame.

    Codewars shouldn't allow a low quality kata like this to be visible at all.

    It even had syntax errors, indentation issues, pep8 violations etc.

  • Custom User Avatar

    The kata itself is good, but the python implementation is really weak.

    Lot of issues, others have already mentioned all of them.

  • Default User Avatar

    "how many times the hoop goes round"

    Can you do minus rounds? I don't think so. The smalles possile number is 0 in this case.