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.
Needs random tests.
There are no random tests.
https://www.codewars.com/kata/mahjong-number-2-seven-pairs
Allow me to place my kata here, thanks :)
The rule of winning is specified here but for now there is no Ruby version.
Any translation is welcome.
Correct; everything for the case of one suit.
I don't know how to play Mahjong and I'm confused about what the criteria for a winning set is, looking at wikipedia confused me more because there seem to be so many different regional variants.
Is the formatting important? Are the tiles alway going to be sorted?
It would be useful if the tests told you the reason why a set was not a winning set.
Here's what I have worked out:
They are either 4 groups of 3 plus 1 group of 2, or 7 groups of 2
The groups of 2 must all be different.
The groups of 3 may be identical?
The groups of 3 are either a) triples or b) runs of 3 consecutive numbers
Is this everthing? Is this correct?
The kata also needs some random tests.