Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
it's listed under the 'debugging' tag, which means the code is bad and needs to be fixed.
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.This comment is hidden because it contains spoiler information about the solution
Wonder if this is really a best practice, although it completely satisfies the task... Well done.
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].)Fixed both issues
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
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.
The kata itself is good, but the python implementation is really weak.
Lot of issues, others have already mentioned all of them.
"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.