Closed phiSgr closed 7 months ago
Thanks, that's a nice idea. Actually I think in Python it's even easier (and possibly hardly slower...) to simply have a list of all possible shapes and a dict mapping shapes back to their indices; I pushed that to main.
The
table
inShape
has 38416 entries. A lot of the possibilities are not valid shapes, i.e. the correspondings, h, d, c
values don't add up to 13.If we use a slightly more complex way to flatten the shape, we can compact the table to 16C3 = 560 possibilities.
(Shameless plug) check my implementation here: https://github.com/phiSgr/rektdeal/blob/101cb144952bd7575f8b4e896770a8b40c9f0ef4/rektdeal/src/main/kotlin/com/github/phisgr/rektdeal/internal/util.kt#L136-L144