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.
Yeeeeah guess the code length should have been restricted to prevent hardcoding - but it wasn't, so fair play xD
I love code golf katas, and my impression has been that they generally tend to be underrated for whatever reason.
(And I'm also stuck, 217 characters and counting...)
Nice one! Think you could even shave off another three characters by replacing
(1/2)
with.5
:)Lovely kata! It's crazy how different the solution for JavaScript is (has to be) from the one for Python, I've learned a lot about metaprogramming in JS! :D
Only (very nitpicky) point of criticism: despite the example 'fire' for a weapon property (which I didn't notice was lower-case until afterwards...), the rule that the weapon name 'matches weaponOfSomething' suggests that all weapon names are camelCase; however, in the random examples, it seems that we can't assume that (I failed my first attempt only because of this and it took a while to find the cause); it's fine either way of course, but it could have been made more clear ;)
Bonusses of 0 and especially -1 (final two fixed tests) don't really make sense within the story, do they?
See https://www.codewars.com/kata/562086bbaacc2b4d13000047/discuss/javascript#657d1ac4dc8017ba924dd64e
The migration from the old expect utility to chai introduced this regression. I'm surprised there aren't any safeguards for expect calls that are never completed. There were a few other no-op expect calls that this report uncovered. Thank you.
P.S. I initally reported this comment, because it read like a person just copying their solution into chat. In the future please mark the comment as an issue and reference the submission without publicly pasting the code.
No clue why that solution passes:
See my comment on your solution and the issue raised in the discussion board - yes, this passes the tests, but I'd argue that this just means that the tests aren't doing what they should ;)
Props for finding this, but I feel like this is more of an exploit than an actual solution as it violates Condition 2 ("Anakin's hint must be a droid color."). I've raised this in the discussion and suggested that this should be enforced more strictly. I do admire the cheek though ;)
This comment is hidden because it contains spoiler information about the solution
Thank you! I agree that the description is ambiguous, I specifically went to the discussion board hoping that it wasn't just me xD
Nice kata! :)
I would suggest adding two more aspects to the tests:
I think it's reasonable to expect a decoder to handle both, but currently it's possible to pass the tests with some solutions that can't ;)
This comment is hidden because it contains spoiler information about the solution
yes, only positive integers.
Loading more items...