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 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
Lovely kata! Just to clarify: the cost for passing a given coordinate will always be a natural number (i.e. an integer greater than 0), correct? (This is suggested by the formulation "moving to a neighboring coordinate counted not as 1 step but as N steps", but it could be stated more explicitly.)
Never mind, it is clear from the sample tests that we can't - but I'll still leave the question here in case anyone else is unsure ;)
Can we assume that (1) the circles do in fact intersect and (2) a != b?
Great kata!
Just to clarify, what exactly is meant by the agent "finding" the gold? Have they found the gold a) once they know where it is or b) once they've entered that room?
(As can easily be seen from this example
it may be possible to do a) but not b).)