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.
Lua translation!
Thanks for the approval!
Lua translation!
Lua translation
Btw, nice kata!
Lua translation
Lua translation!
This comment is hidden because it contains spoiler information about the solution
Btw, you forgot to initialize the random number generator. Just adding
math.randomseed(os.time())
after the requires will do it.Lua translation!
Lua translation!
Btw, I don't know what's the expected length, but I managed to pass the tests with 158 chars.
Please use the
busted
library instead of plain asserts. You can compare two strings usingassert.equals
orassert.are.same
.Here's documentation for it: https://lunarmodules.github.io/busted/
Also get_lines can be written in O(n) as follows:
Same with
setify
, it can be written in O(n) with:Btw, did you know in lua we have the
pairs
andipairs
functions?Lua translation! (anti-cheat included)
Thank you very much for the feedback and the test case, I've just added it!
Lua translation
Loading more items...