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.
Quite sorry for the late response, I have been somewhat MIA here.
First of all, thank you. This post pointed out one of my assumptions that is probably causing confusion for some people; I am relying on the user being familiar with the Codewars provided objects (Test and console).
For the details on the test framework used by Codewars, take a look at http://www.codewars.com/docs/js-slash-coffeescript-test-reference .
You can use
console.log(BlackKnight)
in the code you type for your solution, and it will show some basic output in the response you get from the codewars server. Once you can get output, it should be possible to iterate over the keys of the BlackKnight object and output their corresponding values, and that should help you on your way. I'll restate you can't use the browser console because of the way Codewars works.I hope the above made some sense... If not, feel free to let me know, and I'll see how I can clarify.
Yea, I felt the same. I think it shows in the solutions as well, there's a lot more variation than with most katas (more than one way to skin a cat, and all that).
This is one of the few times where my solution wasn't fairly similar to someone else's.
BlackKnight is prepared before your code. Doing a
console.log(BlackKnight)
should show you that the object does exist.I don't want to give away too much, but (at least for easy difficulty) you should be able to solve the kata simply by inspecting that object (there are many ways to do this; you could iterate over the object properties, for example).
If BlackKnight was undefined or something for you, that's a fair sign something went wrong with the kata setup. In that case, would you mind letting me know? If you can't submit the kata, please post your code (marked as spoiler) below.
This comment is hidden because it contains spoiler information about the solution
Ah, lovely kata, as always!
I do actually use the reply button. I think it has something to do with the preview tab (when I use it, I tend to jump out of the thread), but I haven't been able to reproduce it consistently so far.
... And for some reason, most of my replies end up as separate threads. Bummer.
Thank you for your feedback.
I'd say the purpose of the kata is to figure out a way to bypass a mechanism that you have no control over, without explicit instructions. In that way, I suppose it is incomplete on purpose, yes.
Please don't take offence at my previous comment; what I meant was that you have
at the top of your submitted code. As the comments state, you can change that to (for example)
and the solution you wrote wouldn't pass. The difficulty setting is mostly an experiment to allow you to try and get as far as you can while still being able to submit your solution if you get stuck along the way.
If the difficulty thing was not obvious for you, please let me know. It might indicate that I should move the explanation for that to the description.
Yes, that's exactly the point of the kata (by the way, your solution would only work for the easier difficulties). Is there any particular part of the description that isn't clear enough for you? Is there any suggestion in particular that you would like to make?
Ah, you were talking about the Ruby problem, not the javascript version. That explains why I didn't understand your question :) I'm afraid I have almost no ruby knowledge, the ruby version was added by jhoffner (I think).
Just for the record, you can embed code using the following:
Well, as far as I'm concerned, anything goes. That was the original purpose of the impossible difficulty, and I intend to stick with it. Of course, if I made a dumb mistake in the setup that made it absolutely trivial to beat impossible, I might have fixed that. But seeing as this is the only submission for impossible so far, I think this is a perfectly acceptable answer. Of course, the fact that it uses the exact same technique as the easier difficulties (just one level higher up the chain), makes it all the sweeter (and makes me curse myself for missing it).
So yeah, anything goes, unless everyone can figure it out within minutes.
Oh wow, I totally forgot to store Object.defineProperty...
While I'm tempted to fix the setup, this answer is entirely within the spirit of the kata, so I'll have to let it be. Awesome!
You are indeed brave, sir knight!
So, I've opted for an approach with a couple of difficulties. Why?
Mostly because I noticed in the "You shall not pass" kata (on which this kata is based) some people were unable to complete the kata, and therefore unable to participate in the (interesting) discussion that occurred behind the curtain.
I figured it would be better to let everyone in, and just make the problem as challenging as you want to make it.
One problem this does create: I'm not quite sure what rank to give this kata. While I wouldn't assume too high a rank for anything but
impossible
, there is still quite a gap betweeneasy
andharder
.I'd love to hear what you think!
For anyone who liked this one: I've tried to recreate the essentials of the problem without relying on any Codewars vulnerabilities.
You can find the new kata at http://www.codewars.com/dojo/katas/525988ee6021e918e6000dce/ .
Oh wow, I thought it was going to take at least a little more time before someone passed again. This one actually makes sense to me as well. Congratulations on a clever solution!
Loading more items...