Closed Mystouille closed 3 years ago
Thanks for the report!
Actually there we don't have a bug, the validation on identical pairs will be done before we are checking hand on chitoitsu yaku. I added the unit test to confirm it: https://github.com/MahjongRepository/mahjong/commit/98efa913d5fc71641629614663efafc06d86b608
Let me know if you still think that there is a bug.
Code for Chiitoitsu is:
def is_condition_met(self, hand, *args): return len(hand) == 7
But riichi rules specify that all pairs must be different. I suggest something like:
def is_condition_met(self, hand, *args): return len(hand) == 7 and len(set(hand))==len(hand)