forked from teemutoikkanen/pec
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpec.single.js
More file actions
114 lines (102 loc) · 3.08 KB
/
pec.single.js
File metadata and controls
114 lines (102 loc) · 3.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
'use strict'
const test = require('tape')
const { checkSingle } = require('./util/util')
test('\npreflop:single: pair vs. pair', function(t) {
[ [ 'AsAh', 'KsKh', 82 ]
, [ 'JsJh', '7s7h', 81 ]
, [ 'JsJh', 'TsTh', 82 ]
, [ 'AsAh', '2s2h', 83 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})
test('\npreflop:single: pair vs. overcards', function(t) {
[ [ 'JsJh', 'KsQh', 56 ]
, [ 'JsJh', 'AsQh', 56 ]
, [ 'JsJh', 'AcQc', 54 ]
, [ 'JsJh', 'KcQc', 53 ]
, [ '2s2h', 'KcQc', 48 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})
test('\npreflop:single: pair vs. undercards', function(t) {
[ [ 'JsJh', 'Ts9h', 86 ]
, [ 'JsJh', '6s2h', 88 ]
, [ 'JsJh', 'Tc9c', 81 ]
, [ 'JsJh', '6c2c', 82 ]
, [ '6s6h', '2c3c', 79 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})
test('\npreflop:single: pair vs. overcard and undercard', function(t) {
[ [ 'JsJh', 'Ks9h', 72 ]
, [ 'JsJh', 'Qs6h', 72 ]
, [ 'JsJh', 'Kc9c', 68 ]
, [ 'JsJh', 'Kc6c', 68 ]
, [ '6s6h', 'Tc3c', 65 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})
test('\npreflop:single: pair vs. overcard and card match', function(t) {
[ [ 'JsJh', 'KsJh', 70 ]
, [ 'JsJh', 'QsJh', 69 ]
, [ 'JsJh', 'KcJc', 63 ]
, [ 'JsJh', 'KcJc', 63 ]
, [ '6s6h', 'Tc6c', 61 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})
test('\npreflop:single: pair vs. undercard and card match', function(t) {
[ [ 'JsJh', 'Js9h', 89 ]
, [ 'JsJh', 'Js6h', 93 ]
, [ 'JsJh', 'Jc9c', 81 ]
, [ 'JsJh', 'Jc6c', 85 ]
, [ '6s6h', '6c3c', 83 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})
test('\npreflop:single: two high cards vs. two undercards', function(t) {
[ [ 'KsTh', '7s4h', 66 ]
, [ 'AsQh', 'Js6h', 68 ]
, [ 'KsTh', '7c4c', 60 ]
, [ 'AsQh', 'Jc6c', 63 ]
, [ 'Js8h', '6c3c', 60 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})
test('\npreflop:single: high low card vs. two cards in between', function(t) {
[ [ 'Ks3h', 'Js4h', 59 ]
, [ 'As8h', 'Js9h', 57 ]
, [ 'Ks3h', '7c4c', 53 ]
, [ 'As8h', 'JcTc', 52 ]
, [ 'Js3h', '6c4c', 52 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})
test('\npreflop:single: high and mid card vs. one between and one below', function(t) {
[ [ 'Ks8h', 'Ts6h', 63 ]
, [ 'As8h', 'Js6h', 64 ]
, [ 'Ks3h', '7c2c', 59 ]
, [ 'As8h', 'Jc5c', 59 ]
, [ 'Js3h', '6c2c', 57 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})
test('\npreflop:single: high and low, matched low card', function(t) {
[ [ 'Ks8h', 'Ts8d', 69 ]
, [ 'As8h', 'Js8d', 71 ]
, [ 'Ks3h', '7c3c', 65 ]
, [ 'As8h', 'Jc8c', 65 ]
, [ 'Js3h', '6c3c', 61 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})
test('\npreflop:single: high vs. matched high and low', function(t) {
[ [ 'Ks8h', 'Kd6h', 56 ]
, [ 'As8h', 'Ad6h', 57 ]
, [ 'Ks3h', 'Kc2c', 26 ]
, [ 'As8h', 'Ac5c', 52 ]
, [ 'Js3h', 'Jd2c', 28 ]
, [ 'AsKh', 'Ad9c', 71 ]
].forEach(x => checkSingle.apply(null, [ t ].concat(x)))
t.end()
})