forked from hccheng/py-mcr
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfanimplications.py
More file actions
executable file
·141 lines (136 loc) · 5.08 KB
/
fanimplications.py
File metadata and controls
executable file
·141 lines (136 loc) · 5.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
implied = \
{'All Chows': ['No Honors'],
'All Even Pungs': ['No Honors', 'All Simples', 'All Pungs'],
'All Fives': ['No Honors'],
'All Green': [],
'All Honors': ['Pung of Terminals or Honors', 'All Pungs', 'Outside Hand'],
'All Pungs': [],
'All Simples': ['No Honors'],
'All Terminals': ['No Honors',
'Pung of Terminals or Honors',
'All Pungs',
'Outside Hand',
'Double Pung'],
'All Terminals and Honors': ['Pung of Terminals or Honors',
'All Pungs',
'Outside Hand'],
'All Types': [],
'Big Four Winds': ['Big Three Winds',
'Pung of Terminals or Honors',
'Seat Wind',
'Prevalent Wind',
'All Pungs'],
'Big Three Dragons': ['Dragon Pung',
'Pung of Terminals or Honors',
'Two Dragon Pungs'],
'Big Three Winds': ['Pung of Terminals or Honors'],
'Chicken Hand': [],
'Closed Wait': [],
'Concealed Hand': [],
'Concealed Kong': ['Melded Kong'],
'Double Pung': [],
'Dragon Pung': ['Pung of Terminals or Honors'],
'Edge Wait': [],
'Flower Tiles': [],
'Four Concealed Pungs': ['Two Concealed Pungs',
'Concealed Hand',
'All Pungs',
'Three Concealed Pungs'],
'Four Kongs': ['Three Kongs',
'Single Wait',
'Melded Kong',
'Two Melded Kongs',
'All Pungs'],
'Four Pure Shifted Chows': ['Short Straight', 'Pure Shifted Chows'],
'Four Pure Shifted Pungs': ['Pure Shifted Pungs', 'All Pungs'],
'Full Flush': ['No Honors'],
'Fully Concealed Hand': ['Self-draw', 'Concealed Hand'],
'Greater Honors and Knitted Tiles': ['All Types', 'Concealed Hand'],
'Half Flush': [],
'Knitted Straight': [],
'Last Tile': [],
'Last Tile Claim': [],
'Last Tile Draw': ['Self-draw'],
'Lesser Honors and Knitted Tiles': ['All Types', 'Concealed Hand'],
'Little Four Winds': ['Big Three Winds', 'Pung of Terminals or Honors'],
'Little Three Dragons': ['Dragon Pung',
'Pung of Terminals or Honors',
'Two Dragon Pungs'],
'Lower Four': ['No Honors'],
'Lower Tiles': ['No Honors', 'Lower Four'],
'Melded Hand': ['Single Wait'],
'Melded Kong': [],
'Middle Tiles': ['No Honors', 'All Simples'],
'Mixed Double Chow': [],
'Mixed Shifted Chows': [],
'Mixed Shifted Pungs': [],
'Mixed Straight': [],
'Mixed Triple Chows': ['Mixed Double Chow'],
'Nine Gates': ['No Honors',
'Pung of Terminals or Honors',
'Full Flush',
'Concealed Hand'],
'No Honors': [],
'One Voided Suit': [],
'Out With Replacement Tile': ['Melded Kong'],
'Outside Hand': [],
'Prevalent Wind': ['Pung of Terminals or Honors'],
'Pung of Terminals or Honors': [],
'Pure Double Chow': [],
'Pure Shifted Chows': [],
'Pure Shifted Pungs': [],
'Pure Straight': ['Short Straight', 'Two Terminal Chows'],
'Pure Terminal Chows': ['All Chows',
'No Honors',
'Pure Double Chow',
'Two Terminal Chows',
'Full Flush'],
'Pure Triple Chow': ['Pure Double Chow'],
'Quadruple Chow': ['Pure Double Chow', 'Tile Hog', 'Pure Triple Chow'],
'Reversible Tiles': ['One Voided Suit'],
'Robbing the Kong': [],
'Seat Wind': ['Pung of Terminals or Honors'],
'Self-draw': [],
'Seven Pairs': ['Concealed Hand'],
'Seven Shifted Pairs': ['No Honors',
'Seven Pairs',
'Full Flush',
'Concealed Hand'],
'Short Straight': [],
'Single Wait': [],
'Thirteen Orphans': ['All Types',
'All Terminals and Honors',
'Concealed Hand',
'Outside Hand',
#'Single Wait'
],
'Three Concealed Pungs': ['Two Concealed Pungs'],
'Three Kongs': ['Melded Kong', 'Two Melded Kongs'],
'Three Suited Terminal Chows': ['All Chows',
'No Honors',
'Two Terminal Chows',
'Mixed Double Chow'],
'Tile Hog': [],
'Triple Pung': ['Double Pung'],
'Two Concealed Kongs': ['Two Concealed Pungs',
'Melded Kong',
'Two Melded Kongs',
'Concealed Kong'],
'Two Concealed Pungs': [],
'Two Dragon Pungs': ['Dragon Pung', 'Pung of Terminals or Honors'],
'Two Melded Kongs': ['Melded Kong'],
'Two Terminal Chows': [],
'Upper Four': ['No Honors'],
'Upper Tiles': ['No Honors', 'Upper Four']}
def get_implied_map():
"""
>>> get_implied_map()['Nine Gates']
['No Honors', 'Pung of Terminals or Honors', 'Full Flush', 'Concealed Hand']
"""
global implied
return implied
def _test():
import doctest
doctest.testmod()
if __name__ == "__main__":
_test()