-
-
Notifications
You must be signed in to change notification settings - Fork 562
Expand file tree
/
Copy pathcanonical-data.json
More file actions
369 lines (369 loc) · 11.7 KB
/
Copy pathcanonical-data.json
File metadata and controls
369 lines (369 loc) · 11.7 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
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
{
"exercise": "poker",
"cases": [
{
"uuid": "161f485e-39c2-4012-84cf-bec0c755b66c",
"description": "single hand always wins",
"property": "bestHands",
"input": {
"hands": ["4S 5S 7H 8D JC"]
},
"expected": ["4S 5S 7H 8D JC"]
},
{
"uuid": "370ac23a-a00f-48a9-9965-6f3fb595cf45",
"description": "highest card out of all hands wins",
"property": "bestHands",
"input": {
"hands": ["4D 5S 6S 8D 3C", "2S 4C 7S 9H 10H", "3S 4S 5D 6H JH"]
},
"expected": ["3S 4S 5D 6H JH"]
},
{
"uuid": "d94ad5a7-17df-484b-9932-c64fc26cff52",
"description": "a tie has multiple winners",
"property": "bestHands",
"input": {
"hands": [
"4D 5S 6S 8D 3C",
"2S 4C 7S 9H 10H",
"3S 4S 5D 6H JH",
"3H 4H 5C 6C JD"
]
},
"expected": ["3S 4S 5D 6H JH", "3H 4H 5C 6C JD"]
},
{
"uuid": "61ed83a9-cfaa-40a5-942a-51f52f0a8725",
"description": "multiple hands with the same high cards, tie compares next highest ranked, down to last card",
"property": "bestHands",
"input": {
"hands": ["3S 5H 6S 8D 7H", "2S 5D 6D 8C 7S"]
},
"expected": ["3S 5H 6S 8D 7H"]
},
{
"uuid": "da01becd-f5b0-4342-b7f3-1318191d0580",
"description": "winning high card hand also has the lowest card",
"property": "bestHands",
"input": {
"hands": ["2S 5H 6S 8D 7H", "3S 4D 6D 8C 7S"]
},
"expected": ["2S 5H 6S 8D 7H"]
},
{
"uuid": "f7175a89-34ff-44de-b3d7-f6fd97d1fca4",
"description": "one pair beats high card",
"property": "bestHands",
"input": {
"hands": ["4S 5H 6C 8D KH", "2S 4H 6S 4D JH"]
},
"expected": ["2S 4H 6S 4D JH"]
},
{
"uuid": "e114fd41-a301-4111-a9e7-5a7f72a76561",
"description": "highest pair wins",
"property": "bestHands",
"input": {
"hands": ["4S 2H 6S 2D JH", "2S 4H 6C 4D JD"]
},
"expected": ["2S 4H 6C 4D JD"]
},
{
"uuid": "b3acd3a7-f9fa-4647-85ab-e0a9e07d1365",
"description": "both hands have the same pair, high card wins",
"property": "bestHands",
"input": {
"hands": ["4H 4S AH JC 3D", "4C 4D AS 5D 6C"]
},
"expected": ["4H 4S AH JC 3D"]
},
{
"uuid": "935bb4dc-a622-4400-97fa-86e7d06b1f76",
"description": "two pairs beats one pair",
"property": "bestHands",
"input": {
"hands": ["2S 8H 6S 8D JH", "4S 5H 4C 8C 5C"]
},
"expected": ["4S 5H 4C 8C 5C"]
},
{
"uuid": "c8aeafe1-6e3d-4711-a6de-5161deca91fd",
"description": "both hands have two pairs, highest ranked pair wins",
"property": "bestHands",
"input": {
"hands": ["2S 8H 2D 8D 3H", "4S 5H 4C 8S 5D"]
},
"expected": ["2S 8H 2D 8D 3H"]
},
{
"uuid": "88abe1ba-7ad7-40f3-847e-0a26f8e46a60",
"description": "both hands have two pairs, with the same highest ranked pair, tie goes to low pair",
"property": "bestHands",
"input": {
"hands": ["2S QS 2C QD JH", "JD QH JS 8D QC"]
},
"expected": ["JD QH JS 8D QC"]
},
{
"uuid": "15a7a315-0577-47a3-9981-d6cf8e6f387b",
"description": "both hands have two identically ranked pairs, tie goes to remaining card (kicker)",
"property": "bestHands",
"input": {
"hands": ["JD QH JS 8D QC", "JS QS JC 2D QD"]
},
"expected": ["JD QH JS 8D QC"]
},
{
"uuid": "f761e21b-2560-4774-a02a-b3e9366a51ce",
"description": "both hands have two pairs that add to the same value, win goes to highest pair",
"property": "bestHands",
"input": {
"hands": ["6S 6H 3S 3H AS", "7H 7S 2H 2S AC"]
},
"expected": ["7H 7S 2H 2S AC"]
},
{
"uuid": "fc6277ac-94ac-4078-8d39-9d441bc7a79e",
"description": "two pairs first ranked by largest pair",
"property": "bestHands",
"input": {
"hands": ["5C 2S 5S 4H 4C", "6S 2S 6H 7C 2C"]
},
"expected": ["6S 2S 6H 7C 2C"]
},
{
"uuid": "21e9f1e6-2d72-49a1-a930-228e5e0195dc",
"description": "three of a kind beats two pair",
"property": "bestHands",
"input": {
"hands": ["2S 8H 2H 8D JH", "4S 5H 4C 8S 4H"]
},
"expected": ["4S 5H 4C 8S 4H"]
},
{
"uuid": "c2fffd1f-c287-480f-bf2d-9628e63bbcc3",
"description": "both hands have three of a kind, tie goes to highest ranked triplet",
"property": "bestHands",
"input": {
"hands": ["2S 2H 2C 8D JH", "4S AH AS 8C AD"]
},
"expected": ["4S AH AS 8C AD"]
},
{
"uuid": "eb856cc2-481c-4b0d-9835-4d75d07a5d9d",
"description": "with multiple decks, two players can have same three of a kind, ties go to highest remaining cards",
"property": "bestHands",
"input": {
"hands": ["4S AH AS 7C AD", "4S AH AS 8C AD"]
},
"expected": ["4S AH AS 8C AD"]
},
{
"uuid": "26a4a7d4-34a2-4f18-90b4-4a8dd35d2bb1",
"reimplements": "eb856cc2-481c-4b0d-9835-4d75d07a5d9d",
"description": "with multiple decks, two players can have same three of a kind, ties go to highest remaining cards",
"comments": [
"Ensure that high cards are checked in the correct order (high to low)."
],
"property": "bestHands",
"input": {
"hands": ["5S AH AS 7C AD", "4S AH AS 8C AD"]
},
"expected": ["4S AH AS 8C AD"]
},
{
"uuid": "a858c5d9-2f28-48e7-9980-b7fa04060a60",
"description": "a straight beats three of a kind",
"property": "bestHands",
"input": {
"hands": ["4S 5H 4C 8D 4H", "3S 4D 2S 6D 5C"]
},
"expected": ["3S 4D 2S 6D 5C"]
},
{
"uuid": "73c9c756-e63e-4b01-a88d-0d4491a7a0e3",
"description": "aces can end a straight (10 J Q K A)",
"property": "bestHands",
"input": {
"hands": ["4S 5H 4C 8D 4H", "10D JH QS KD AC"]
},
"expected": ["10D JH QS KD AC"]
},
{
"uuid": "76856b0d-35cd-49ce-a492-fe5db53abc02",
"description": "aces can start a straight (A 2 3 4 5)",
"property": "bestHands",
"input": {
"hands": ["4S 5H 4C 8D 4H", "4D AH 3S 2D 5C"]
},
"expected": ["4D AH 3S 2D 5C"]
},
{
"uuid": "e214b7df-dcba-45d3-a2e5-342d8c46c286",
"description": "aces cannot be in the middle of a straight (Q K A 2 3)",
"property": "bestHands",
"input": {
"hands": ["2C 3D 7H 5H 2S", "QS KH AC 2D 3S"]
},
"expected": ["2C 3D 7H 5H 2S"]
},
{
"uuid": "6980c612-bbff-4914-b17a-b044e4e69ea1",
"description": "both hands with a straight, tie goes to highest ranked card",
"property": "bestHands",
"input": {
"hands": ["4S 6C 7S 8D 5H", "5S 7H 8S 9D 6H"]
},
"expected": ["5S 7H 8S 9D 6H"]
},
{
"uuid": "5135675c-c2fc-4e21-9ba3-af77a32e9ba4",
"description": "even though an ace is usually high, a 5-high straight is the lowest-scoring straight",
"property": "bestHands",
"input": {
"hands": ["2H 3C 4D 5D 6H", "4S AH 3S 2D 5H"]
},
"expected": ["2H 3C 4D 5D 6H"]
},
{
"uuid": "c601b5e6-e1df-4ade-b444-b60ce13b2571",
"description": "flush beats a straight",
"property": "bestHands",
"input": {
"hands": ["4C 6H 7D 8D 5H", "2S 4S 5S 6S 7S"]
},
"expected": ["2S 4S 5S 6S 7S"]
},
{
"uuid": "4d90261d-251c-49bd-a468-896bf10133de",
"description": "both hands have a flush, tie goes to high card, down to the last one if necessary",
"property": "bestHands",
"input": {
"hands": ["4H 7H 8H 9H 6H", "2S 4S 5S 6S 7S"]
},
"expected": ["4H 7H 8H 9H 6H"]
},
{
"uuid": "e04137c5-c19a-4dfc-97a1-9dfe9baaa2ff",
"reimplements": "4d90261d-251c-49bd-a468-896bf10133de",
"description": "both hands have a flush, tie goes to high card, down to the last one if necessary",
"comments": [
"Ensure that high cards are checked in the correct order (high to low)."
],
"property": "bestHands",
"input": {
"hands": ["2H 7H 8H 9H 6H", "3S 5S 6S 7S 8S"]
},
"expected": ["2H 7H 8H 9H 6H"]
},
{
"uuid": "3a19361d-8974-455c-82e5-f7152f5dba7c",
"description": "full house beats a flush",
"property": "bestHands",
"input": {
"hands": ["3H 6H 7H 8H 5H", "4S 5H 4C 5D 4H"]
},
"expected": ["4S 5H 4C 5D 4H"]
},
{
"uuid": "eb73d0e6-b66c-4f0f-b8ba-bf96bc0a67f0",
"description": "both hands have a full house, tie goes to highest-ranked triplet",
"property": "bestHands",
"input": {
"hands": ["4H 4S 4D 9S 9D", "5H 5S 5D 8S 8D"]
},
"expected": ["5H 5S 5D 8S 8D"]
},
{
"uuid": "34b51168-1e43-4c0d-9b32-e356159b4d5d",
"description": "with multiple decks, both hands have a full house with the same triplet, tie goes to the pair",
"property": "bestHands",
"input": {
"hands": ["5H 5S 5D 9S 9D", "5H 5S 5D 8S 8D"]
},
"expected": ["5H 5S 5D 9S 9D"]
},
{
"uuid": "d61e9e99-883b-4f99-b021-18f0ae50c5f4",
"description": "four of a kind beats a full house",
"property": "bestHands",
"input": {
"hands": ["4S 5H 4D 5D 4H", "3S 3H 2S 3D 3C"]
},
"expected": ["3S 3H 2S 3D 3C"]
},
{
"uuid": "2e1c8c63-e0cb-4214-a01b-91954490d2fe",
"description": "both hands have four of a kind, tie goes to high quad",
"property": "bestHands",
"input": {
"hands": ["2S 2H 2C 8D 2D", "4S 5H 5S 5D 5C"]
},
"expected": ["4S 5H 5S 5D 5C"]
},
{
"uuid": "892ca75d-5474-495d-9f64-a6ce2dcdb7e1",
"description": "with multiple decks, both hands with identical four of a kind, tie determined by kicker",
"property": "bestHands",
"input": {
"hands": ["3S 3H 2S 3D 3C", "3S 3H 4S 3D 3C"]
},
"expected": ["3S 3H 4S 3D 3C"]
},
{
"uuid": "923bd910-dc7b-4f7d-a330-8b42ec10a3ac",
"description": "straight flush beats four of a kind",
"property": "bestHands",
"input": {
"hands": ["4S 5H 5S 5D 5C", "7S 8S 9S 6S 10S"]
},
"expected": ["7S 8S 9S 6S 10S"]
},
{
"uuid": "d9629e22-c943-460b-a951-2134d1b43346",
"description": "aces can end a straight flush (10 J Q K A)",
"property": "bestHands",
"input": {
"hands": ["KC AH AS AD AC", "10C JC QC KC AC"]
},
"expected": ["10C JC QC KC AC"]
},
{
"uuid": "05d5ede9-64a5-4678-b8ae-cf4c595dc824",
"description": "aces can start a straight flush (A 2 3 4 5)",
"property": "bestHands",
"input": {
"hands": ["KS AH AS AD AC", "4H AH 3H 2H 5H"]
},
"expected": ["4H AH 3H 2H 5H"]
},
{
"uuid": "ad655466-6d04-49e8-a50c-0043c3ac18ff",
"description": "aces cannot be in the middle of a straight flush (Q K A 2 3)",
"property": "bestHands",
"input": {
"hands": ["2C AC QC 10C KC", "QH KH AH 2H 3H"]
},
"expected": ["2C AC QC 10C KC"]
},
{
"uuid": "d0927f70-5aec-43db-aed8-1cbd1b6ee9ad",
"description": "both hands have a straight flush, tie goes to highest-ranked card",
"property": "bestHands",
"input": {
"hands": ["4H 6H 7H 8H 5H", "5S 7S 8S 9S 6S"]
},
"expected": ["5S 7S 8S 9S 6S"]
},
{
"uuid": "be620e09-0397-497b-ac37-d1d7a4464cfc",
"description": "even though an ace is usually high, a 5-high straight flush is the lowest-scoring straight flush",
"property": "bestHands",
"input": {
"hands": ["2H 3H 4H 5H 6H", "4D AD 3D 2D 5D"]
},
"expected": ["2H 3H 4H 5H 6H"]
}
]
}