Skip to content
This repository has been archived by the owner on Jun 23, 2024. It is now read-only.

Wrong Shanten Calculating #43

Open
taeho-gwon opened this issue Aug 4, 2022 · 1 comment
Open

Wrong Shanten Calculating #43

taeho-gwon opened this issue Aug 4, 2022 · 1 comment
Labels

Comments

@taeho-gwon
Copy link

sh = Shanten()
tiles = TilesConverter.string_to_34_array(man='123456789', honors='1111')
print(sh.calculate_shanten_for_regular_hand(tiles))
tiles2 = TilesConverter.string_to_34_array(man='123456789', pin='1111')
print(sh.calculate_shanten_for_regular_hand(tiles2))

output

1
0

In shanten calculation, 4 non-honor tiles can be used as meld and waiting itself as pair, but it is impossible.

@Nihisil Nihisil added the bug label Aug 28, 2022
@Nihisil
Copy link
Contributor

Nihisil commented Aug 28, 2022

Thanks for the report, the shanten calculations are more correct with 14 tiles.

With 13 tiles, it may have the issue as you mentioned.

The bug needed to be fixed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants