MahjongRepository / mahjong

Implementation of riichi mahjong related stuff (hand cost, shanten, agari end, etc.)
MIT License
377 stars 38 forks source link

Agari does not work with more than 14 tiles in hand? #6

Closed Enerccio closed 5 years ago

Enerccio commented 5 years ago
>>> melds = [TilesConverter.string_to_34_array(sou='1111')]
>>> tiles =  TilesConverter.string_to_34_array(sou='111122233344455')
>>> a.is_agari(tiles, melds)
False
>>> a.is_agari(tiles)
False

15 tiles hand should be winnable because of that kan

Enerccio commented 5 years ago

ok apparently they have to be as pons

Nihisil commented 5 years ago

Yeah, you can't just add 1111 tiles to the hand. The library needs to know if that kan was declared or not, otherwise, these tiles could be used in different forms.

Enerccio commented 5 years ago

yep, I just wish it was explained more. It's quite hard to use this library at the beginning lol