mahjong.constants
- mahjong.constants.TERMINAL_INDICES = frozenset({0, 8, 9, 17, 18, 26})
Tile indices (34-format) of terminal tiles — 1 and 9 of each suit (man, pin, sou).
- mahjong.constants.EAST = 27
Tile index (34-format) for East wind.
- mahjong.constants.SOUTH = 28
Tile index (34-format) for South wind.
- mahjong.constants.WEST = 29
Tile index (34-format) for West wind.
- mahjong.constants.NORTH = 30
Tile index (34-format) for North wind.
- mahjong.constants.HAKU = 31
Tile index (34-format) for Haku (white dragon).
- mahjong.constants.HATSU = 32
Tile index (34-format) for Hatsu (green dragon).
- mahjong.constants.CHUN = 33
Tile index (34-format) for Chun (red dragon).
- mahjong.constants.WINDS = frozenset({27, 28, 29, 30})
Tile indices (34-format) of all four wind tiles.
- mahjong.constants.DRAGONS = frozenset({31, 32, 33})
Tile indices (34-format) of all three dragon tiles.
- mahjong.constants.HONOR_INDICES = frozenset({27, 28, 29, 30, 31, 32, 33})
Tile indices (34-format) of all honor tiles — winds and dragons.
- mahjong.constants.TERMINAL_AND_HONOR_INDICES = frozenset({0, 8, 9, 17, 18, 26, 27, 28, 29, 30, 31, 32, 33})
Tile indices (34-format) of all terminal and honor tiles.
- mahjong.constants.FIVE_RED_MAN = 16
Tile index (136-format) for the red five of man (characters).
- mahjong.constants.FIVE_RED_PIN = 52
Tile index (136-format) for the red five of pin (circles).
- mahjong.constants.FIVE_RED_SOU = 88
Tile index (136-format) for the red five of sou (bamboo).
- mahjong.constants.AKA_DORAS = frozenset({16, 52, 88})
Tile indices (136-format) of all three red five (aka dora) tiles.
- mahjong.constants.DISPLAY_WINDS = {27: 'East', 28: 'South', 29: 'West', 30: 'North'}
Mapping from wind tile indices (34-format) to their English display names.