Ad
  • Custom User Avatar

    Yeeeeah guess the code length should have been restricted to prevent hardcoding - but it wasn't, so fair play xD

  • Custom User Avatar

    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...)

  • Custom User Avatar

    Nice one! Think you could even shave off another three characters by replacing (1/2) with .5 :)

  • Custom User Avatar

    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 ;)

  • Custom User Avatar

    Bonusses of 0 and especially -1 (final two fixed tests) don't really make sense within the story, do they?

  • Custom User Avatar

    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 ;)

  • Custom User Avatar

    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 ;)

  • Custom User Avatar

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

  • Custom User Avatar

    Thank you! I agree that the description is ambiguous, I specifically went to the discussion board hoping that it wasn't just me xD

  • Custom User Avatar

    Nice kata! :)

    I would suggest adding two more aspects to the tests:

    1. some longer codes/messages, say > 150 characters, and
    2. some codes/messages containing a wider range of characters, say all printable ASCII characters or at least some of the special characters highlighted in the instructions.

    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 ;)

  • Custom User Avatar

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

  • Custom User Avatar

    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.)

  • Custom User Avatar

    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 ;)

  • Custom User Avatar

    Can we assume that (1) the circles do in fact intersect and (2) a != b?

  • Default User Avatar

    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

    [[*"___W"],
     [*"____"],
     [*"__PP"],
     [*"__PG"]]
    

    it may be possible to do a) but not b).)