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.
Yes, like that.
Somethin' like this: https://www.codewars.com/kumite/5d4ad2f58bbcfd713a4788d8?sel=5d4ae3645e4197001174173f
Well, style-wise a reference solution looks better as a separate function; even more so when you have to repeat it twice, that's what functions are for.
(Anyway, it's a new translation, so I can't approve it now.)
https://www.codewars.com/kumite/5d3c712480afda00164f832e?sel=5d4ad2f58bbcfd713a4788d8
The reference solution should be private.
(Note that normally a
Random
object is supposed to be constructed once, although it doesn't matter much for kata testing purposes.)