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.
Indeed, perhaps test for n < 1?
Needs some more tests, ex:
Test.assertEquals(Dice.of('2').toString(),"1d2")
Test.assertEquals(Dice.of('d2').toString(),"1d2")
Test.assertEquals(Dice.of("3d").toString(), "3d6")
Test.assertEquals(Dice.of("1d7").toString(), "1d7")
Would have been great to know what the input was when my tests failed!
This should maybe be tagged with Mathematics too.
Agreed, stating (in the test) that the first sample is [1,3,4] would have saved me some time.