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.
... Easy fix... =_=
Thank you for bringing the issue to my attention, if it still doesn't work come yell at me
Thank you for the translation!
Lua translation !
You're right, I'll see that this is resolved
This comment is hidden because it contains spoiler information about the solution
Thank you!
javascript translation
Thank you for the translation!
Python translation
Nice kata by the way!
You're right. I will alter the kata.
L is not the length of the output string as stated in the problem spec, it is the length of the input array of strings.
After a year and a half it is done. Very cool
Thank you so much! I'll definitely get to changing the kata when I can, and most likely experiment a little. Really helpful!
So for random test cases, you should definitely look at katas you've solved and see how they implemented random tests into their kata so you get a good idea and a good variety of implementations. You can't really "follow along" with a guide because creating random test cases varies from kata to kata.
For starters, I'll answer your question that you asked in your reply. You need to create a private method of the solution inside of your test cases. So then when you call
assertEquals(correct output, user's output)
, you can just call your private solution method in order to see if the user's solution was correct. Again, look at katas you've solved to get a better idea of this.For this kata in particular, I would recommend you make an array that keeps a pool of words it can randomly take from instead of just adding empty strings everywhere that isnt't a snark location (just makes it look nicer I suppose). Have some sort of "chance" (maybe like a 9/10 chance?) that there is a snark and insert it into a random location in your array. Then randomly assign integer values into the "Boojumeter" array. For this I would recommend to make it a pretty small bounds in order to ensure that there's a good chance of 0-14 being assigned (so it's not always a Boojum).
I hope this steers you in the right direction, and I hope you continue to author more katas in the future!
As I am new to making kata, I unfortunately do not know how to implement random tests. I looked up a guide online and I got to comparing the user's code to the author's, but had trouble where.. how do I put this..
I attempted to call .authAssess (author's solution) and .assess (user's solution) but when actually doing the kata and testing it, authAssess could not be found. I'm not sure how to fix this. Right now, all of that code for random tests is stored within a comment. Can you help me?
Loading more items...