trackler 2.2.1.100 → 2.2.1.101
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/trackler/version.rb +1 -1
- data/problem-specifications/exercises/kindergarten-garden/canonical-data.json +37 -19
- data/problem-specifications/exercises/ocr-numbers/canonical-data.json +144 -110
- data/problem-specifications/exercises/palindrome-products/canonical-data.json +49 -25
- data/problem-specifications/exercises/poker/canonical-data.json +171 -115
- data/problem-specifications/exercises/prime-factors/canonical-data.json +22 -8
- data/problem-specifications/exercises/protein-translation/canonical-data.json +70 -24
- data/problem-specifications/exercises/proverb/canonical-data.json +24 -12
- data/problem-specifications/exercises/queen-attack/canonical-data.json +115 -91
- data/problem-specifications/exercises/rail-fence-cipher/canonical-data.json +25 -13
- data/problem-specifications/exercises/raindrops/canonical-data.json +55 -19
- data/problem-specifications/exercises/rational-numbers/canonical-data.json +374 -0
- data/problem-specifications/exercises/rational-numbers/description.md +27 -0
- data/problem-specifications/exercises/rational-numbers/metadata.yml +4 -0
- data/problem-specifications/exercises/rectangles/canonical-data.json +93 -67
- data/problem-specifications/exercises/reverse-string/canonical-data.json +16 -6
- data/problem-specifications/exercises/rna-transcription/metadata.yml +3 -3
- data/problem-specifications/exercises/roman-numerals/canonical-data.json +10 -2
- data/tracks/bash/config.json +11 -11
- data/tracks/c/exercises/roman-numerals/test/test_roman_numerals.c +7 -0
- data/tracks/clojure/exercises/armstrong-numbers/README.md +1 -1
- data/tracks/delphi/config.json +11 -0
- data/tracks/delphi/exercises/clock/uClockExample.pas +6 -1
- data/tracks/delphi/exercises/clock/uClockTest.pas +22 -19
- data/tracks/delphi/exercises/isbn-verifier/README.md +1 -1
- data/tracks/delphi/exercises/reverse-string/README.md +1 -1
- data/tracks/delphi/exercises/rna-transcription/README.md +1 -1
- data/tracks/delphi/exercises/roman-numerals/uRomanNumeralsTest.pas +14 -0
- data/tracks/delphi/exercises/space-age/README.md +45 -0
- data/tracks/delphi/exercises/space-age/SpaceAge.dpr +60 -0
- data/tracks/delphi/exercises/space-age/uSpaceAgeExample.pas +120 -0
- data/tracks/delphi/exercises/space-age/uSpaceAgeTests.pas +135 -0
- data/tracks/delphi/exercises/two-fer/README.md +1 -1
- data/tracks/elixir/exercises/nth-prime/nth_prime.exs +0 -1
- data/tracks/fsharp/exercises/pov/PovTest.fs +66 -53
- data/tracks/fsharp/exercises/space-age/Example.fs +11 -11
- data/tracks/fsharp/exercises/space-age/SpaceAge.fs +1 -1
- data/tracks/fsharp/exercises/space-age/SpaceAgeTest.fs +21 -34
- data/tracks/fsharp/exercises/triangle/Example.fs +11 -16
- data/tracks/fsharp/exercises/triangle/Triangle.fs +4 -5
- data/tracks/fsharp/exercises/triangle/TriangleTest.fs +44 -31
- data/tracks/fsharp/generators/Generators.fs +121 -0
- data/tracks/go/config.json +12 -0
- data/tracks/go/exercises/clock/.meta/gen.go +37 -13
- data/tracks/go/exercises/clock/cases_test.go +10 -10
- data/tracks/go/exercises/clock/clock_test.go +16 -2
- data/tracks/go/exercises/clock/example.go +4 -0
- data/tracks/go/exercises/clock/example_clock_test.go +3 -3
- data/tracks/go/exercises/parallel-letter-frequency/.meta/hints.md +33 -0
- data/tracks/go/exercises/parallel-letter-frequency/README.md +35 -0
- data/tracks/go/exercises/raindrops/.meta/hints.md +7 -4
- data/tracks/go/exercises/raindrops/README.md +12 -0
- data/tracks/go/exercises/roman-numerals/.meta/gen.go +4 -2
- data/tracks/go/exercises/roman-numerals/cases_test.go +3 -2
- data/tracks/go/exercises/space-age/.meta/hints.md +10 -0
- data/tracks/go/exercises/space-age/README.md +14 -1
- data/tracks/go/exercises/twelve-days/README.md +2 -5
- data/tracks/go/exercises/two-bucket/.meta/gen.go +62 -0
- data/tracks/go/exercises/two-bucket/.meta/hints.md +16 -0
- data/tracks/go/exercises/two-bucket/README.md +72 -0
- data/tracks/go/exercises/two-bucket/cases_test.go +44 -0
- data/tracks/go/exercises/two-bucket/example.go +198 -0
- data/tracks/go/exercises/two-bucket/two_bucket_test.go +61 -0
- data/tracks/idris/.travis.yml +3 -2
- data/tracks/idris/bin/fetch-idris-testing.sh +11 -0
- data/tracks/idris/bin/solve_exercises.sh +2 -2
- data/tracks/idris/config.json +11 -0
- data/tracks/idris/config/exercise_readme.go.tmpl +0 -3
- data/tracks/idris/docs/INSTALLATION.md +22 -0
- data/tracks/idris/docs/TESTS.md +12 -4
- data/tracks/idris/exercises/accumulate/src/Accumulate.idr +5 -0
- data/tracks/idris/exercises/hamming/Hamming.ipkg +2 -0
- data/tracks/idris/exercises/hamming/src/{example.idr → Example.idr} +5 -1
- data/tracks/idris/exercises/hamming/src/Hamming.idr +13 -5
- data/tracks/idris/exercises/hamming/src/Test/Hamming.idr +31 -58
- data/tracks/idris/exercises/hello-world/HelloWorld.ipkg +2 -0
- data/tracks/idris/exercises/hello-world/src/Example.idr +9 -0
- data/tracks/idris/exercises/hello-world/src/HelloWorld.idr +6 -1
- data/tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr +18 -18
- data/tracks/idris/exercises/leap/Leap.ipkg +2 -0
- data/tracks/idris/exercises/leap/src/{example.idr → Example.idr} +4 -0
- data/tracks/idris/exercises/leap/src/Leap.idr +5 -1
- data/tracks/idris/exercises/leap/src/Test/Leap.idr +21 -30
- data/tracks/idris/exercises/rna-transcription/Makefile +23 -0
- data/tracks/idris/exercises/rna-transcription/README.md +27 -0
- data/tracks/idris/exercises/rna-transcription/RnaTranscription.ipkg +5 -0
- data/tracks/idris/exercises/rna-transcription/src/RnaTranscription.idr +17 -0
- data/tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr +27 -0
- data/tracks/idris/exercises/rna-transcription/src/example.idr +35 -0
- data/tracks/java/exercises/etl/.meta/version +1 -0
- data/tracks/java/exercises/gigasecond/.meta/version +1 -0
- data/tracks/java/exercises/isbn-verifier/README.md +1 -1
- data/tracks/java/exercises/nucleotide-count/.meta/src/reference/java/NucleotideCounter.java +7 -1
- data/tracks/java/exercises/nucleotide-count/.meta/version +1 -0
- data/tracks/java/exercises/nucleotide-count/src/test/java/NucleotideCounterTest.java +19 -54
- data/tracks/java/exercises/proverb/.meta/version +1 -0
- data/tracks/java/exercises/reverse-string/README.md +1 -1
- data/tracks/java/exercises/rna-transcription/README.md +1 -1
- data/tracks/java/exercises/sum-of-multiples/.meta/version +1 -0
- data/tracks/java/exercises/sum-of-multiples/src/test/java/SumOfMultiplesTest.java +13 -1
- data/tracks/kotlin/config/exercise_readme.go.tmpl +0 -3
- data/tracks/kotlin/docs/TESTS.md +1 -1
- data/tracks/objective-c/config.json +11 -0
- data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureExample.h +7 -0
- data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureExample.m +26 -0
- data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureTest.m +39 -0
- data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +31 -1
- data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/xcshareddata/xcschemes/OCLint.xcscheme +3 -1
- data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/xcshareddata/xcschemes/xobjectivecTest.xcscheme +3 -1
- data/tracks/ocaml/exercises/forth/example.ml +9 -9
- data/tracks/ocaml/tools/test-generator/Makefile +3 -9
- data/tracks/ocaml/tools/test-generator/src/test_gen.ml +18 -16
- data/tracks/perl6/exercises/acronym/.meta/exercise-data.yaml +1 -1
- data/tracks/perl6/exercises/acronym/acronym.t +4 -14
- data/tracks/perl6/exercises/all-your-base/all-your-base.t +0 -2
- data/tracks/perl6/exercises/allergies/allergies.t +0 -2
- data/tracks/perl6/exercises/anagram/.meta/exercise-data.yaml +1 -1
- data/tracks/perl6/exercises/anagram/anagram.t +2 -40
- data/tracks/perl6/exercises/atbash-cipher/atbash-cipher.t +0 -1
- data/tracks/perl6/exercises/bob/bob.t +0 -2
- data/tracks/perl6/exercises/clock/.meta/exercise-data.yaml +15 -11
- data/tracks/perl6/exercises/clock/.meta/solutions/Clock.pm6 +5 -1
- data/tracks/perl6/exercises/clock/Clock.pm6 +1 -1
- data/tracks/perl6/exercises/clock/clock.t +314 -217
- data/tracks/perl6/exercises/etl/etl.t +0 -2
- data/tracks/perl6/exercises/flatten-array/flatten-array.t +0 -2
- data/tracks/perl6/exercises/grains/grains.t +0 -2
- data/tracks/perl6/exercises/hamming/.meta/exercise-data.yaml +2 -2
- data/tracks/perl6/exercises/hamming/hamming.t +63 -35
- data/tracks/perl6/exercises/hello-world/hello-world.t +2 -3
- data/tracks/perl6/exercises/leap/.meta/exercise-data.yaml +1 -1
- data/tracks/perl6/exercises/leap/leap.t +14 -8
- data/tracks/perl6/exercises/luhn/luhn.t +0 -2
- data/tracks/perl6/exercises/nucleotide-count/.meta/exercise-data.yaml +2 -2
- data/tracks/perl6/exercises/nucleotide-count/nucleotide-count.t +18 -10
- data/tracks/perl6/exercises/pangram/.meta/exercise-data.yaml +1 -1
- data/tracks/perl6/exercises/pangram/pangram.t +32 -14
- data/tracks/perl6/exercises/phone-number/.meta/exercise-data.yaml +4 -4
- data/tracks/perl6/exercises/phone-number/.meta/solutions/Phone.pm6 +1 -1
- data/tracks/perl6/exercises/phone-number/Phone.pm6 +1 -1
- data/tracks/perl6/exercises/phone-number/phone-number.t +59 -21
- data/tracks/perl6/exercises/raindrops/raindrops.t +0 -2
- data/tracks/perl6/exercises/rna-transcription/.meta/exercise-data.yaml +1 -1
- data/tracks/perl6/exercises/rna-transcription/README.md +1 -1
- data/tracks/perl6/exercises/rna-transcription/rna-transcription.t +17 -9
- data/tracks/perl6/exercises/roman-numerals/.meta/exercise-data.yaml +3 -3
- data/tracks/perl6/exercises/roman-numerals/.meta/solutions/RomanNumerals.pm6 +1 -1
- data/tracks/perl6/exercises/roman-numerals/RomanNumerals.pm6 +1 -1
- data/tracks/perl6/exercises/roman-numerals/roman-numerals.t +66 -24
- data/tracks/perl6/exercises/scrabble-score/.meta/exercise-data.yaml +1 -1
- data/tracks/perl6/exercises/scrabble-score/scrabble-score.t +35 -15
- data/tracks/perl6/exercises/space-age/.meta/exercise-data.yaml +1 -1
- data/tracks/perl6/exercises/space-age/space-age.t +34 -20
- data/tracks/perl6/exercises/two-fer/.meta/exercise-data.yaml +2 -2
- data/tracks/perl6/exercises/two-fer/two-fer.t +15 -11
- data/tracks/perl6/exercises/word-count/.meta/exercise-data.yaml +1 -1
- data/tracks/perl6/exercises/word-count/word-count.t +46 -26
- data/tracks/perl6/exercises/wordy/.meta/exercise-data.yaml +2 -2
- data/tracks/perl6/exercises/wordy/wordy.t +51 -21
- data/tracks/perl6/lib/Exercism/Generator.pm6 +1 -1
- data/tracks/perl6/t/generated-tests.t +1 -1
- data/tracks/perl6/templates/test.mustache +0 -1
- data/tracks/python/config.json +12 -0
- data/tracks/python/exercises/forth/example.py +1 -1
- data/tracks/python/exercises/forth/forth_test.py +43 -38
- data/tracks/python/exercises/spiral-matrix/README.md +42 -0
- data/tracks/python/exercises/spiral-matrix/example.py +11 -0
- data/tracks/python/exercises/spiral-matrix/spiral_matrix.py +2 -0
- data/tracks/python/exercises/spiral-matrix/spiral_matrix_test.py +40 -0
- data/tracks/racket/config/exercise_readme.go.tmpl +24 -4
- data/tracks/racket/exercises/accumulate/README.md +3 -6
- data/tracks/racket/exercises/acronym/README.md +3 -4
- data/tracks/racket/exercises/allergies/README.md +3 -4
- data/tracks/racket/exercises/anagram/README.md +3 -3
- data/tracks/racket/exercises/bob/README.md +5 -3
- data/tracks/racket/exercises/collatz-conjecture/README.md +3 -3
- data/tracks/racket/exercises/difference-of-squares/README.md +3 -3
- data/tracks/racket/exercises/etl/README.md +6 -4
- data/tracks/racket/exercises/gigasecond/README.md +3 -3
- data/tracks/racket/exercises/grains/README.md +3 -4
- data/tracks/racket/exercises/grep/README.md +15 -15
- data/tracks/racket/exercises/hamming/README.md +3 -3
- data/tracks/racket/exercises/hello-world/README.md +1 -1
- data/tracks/racket/exercises/leap/README.md +4 -4
- data/tracks/racket/exercises/list-ops/README.md +3 -4
- data/tracks/racket/exercises/meetup/README.md +19 -15
- data/tracks/racket/exercises/nucleotide-count/README.md +11 -25
- data/tracks/racket/exercises/perfect-numbers/README.md +5 -5
- data/tracks/racket/exercises/phone-number/README.md +7 -6
- data/tracks/racket/exercises/raindrops/README.md +3 -3
- data/tracks/racket/exercises/rna-transcription/README.md +4 -4
- data/tracks/racket/exercises/roman-numerals/README.md +4 -4
- data/tracks/racket/exercises/say/README.md +3 -3
- data/tracks/racket/exercises/scrabble-score/README.md +6 -4
- data/tracks/racket/exercises/word-count/README.md +4 -5
- data/tracks/scheme/config/exercise_readme.go.tmpl +0 -3
- data/tracks/scheme/docs/INSTALLATION.md +23 -14
- metadata +40 -9
- data/tracks/idris/docs/EXERCISE_README_INSERT.md +0 -0
- data/tracks/idris/exercises/hello-world/src/example.idr +0 -5
- data/tracks/kotlin/config/exercise-readme-insert.md +0 -1
- data/tracks/racket/docs/EXERCISE_README_INSERT.md +0 -23
- data/tracks/scheme/docs/EXERCISE_README_INSERT.md +0 -0
@@ -1,11 +1,13 @@
|
|
1
1
|
{
|
2
2
|
"exercise": "palindrome-products",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.1.0",
|
4
4
|
"cases": [{
|
5
5
|
"description": "finds the smallest palindrome from single digit factors",
|
6
6
|
"property": "smallest",
|
7
|
-
"
|
8
|
-
|
7
|
+
"input": {
|
8
|
+
"min": 1,
|
9
|
+
"max": 9
|
10
|
+
},
|
9
11
|
"expected": {
|
10
12
|
"value": 1,
|
11
13
|
"factors": [
|
@@ -16,8 +18,10 @@
|
|
16
18
|
{
|
17
19
|
"description": "finds the largest palindrome from single digit factors",
|
18
20
|
"property": "largest",
|
19
|
-
"
|
20
|
-
|
21
|
+
"input": {
|
22
|
+
"min": 1,
|
23
|
+
"max": 9
|
24
|
+
},
|
21
25
|
"expected": {
|
22
26
|
"value": 9,
|
23
27
|
"factors": [
|
@@ -29,8 +33,10 @@
|
|
29
33
|
{
|
30
34
|
"description": "find the smallest palindrome from double digit factors",
|
31
35
|
"property": "smallest",
|
32
|
-
"
|
33
|
-
|
36
|
+
"input": {
|
37
|
+
"min": 10,
|
38
|
+
"max": 99
|
39
|
+
},
|
34
40
|
"expected": {
|
35
41
|
"value": 121,
|
36
42
|
"factors": [
|
@@ -41,8 +47,10 @@
|
|
41
47
|
{
|
42
48
|
"description": "find the largest palindrome from double digit factors",
|
43
49
|
"property": "largest",
|
44
|
-
"
|
45
|
-
|
50
|
+
"input": {
|
51
|
+
"min": 10,
|
52
|
+
"max": 99
|
53
|
+
},
|
46
54
|
"expected": {
|
47
55
|
"value": 9009,
|
48
56
|
"factors": [
|
@@ -53,8 +61,10 @@
|
|
53
61
|
{
|
54
62
|
"description": "find smallest palindrome from triple digit factors",
|
55
63
|
"property": "smallest",
|
56
|
-
"
|
57
|
-
|
64
|
+
"input": {
|
65
|
+
"min": 100,
|
66
|
+
"max": 999
|
67
|
+
},
|
58
68
|
"expected": {
|
59
69
|
"value": 10201,
|
60
70
|
"factors": [
|
@@ -65,8 +75,10 @@
|
|
65
75
|
{
|
66
76
|
"description": "find the largest palindrome from triple digit factors",
|
67
77
|
"property": "largest",
|
68
|
-
"
|
69
|
-
|
78
|
+
"input": {
|
79
|
+
"min": 100,
|
80
|
+
"max": 999
|
81
|
+
},
|
70
82
|
"expected": {
|
71
83
|
"value": 906609,
|
72
84
|
"factors": [
|
@@ -77,8 +89,10 @@
|
|
77
89
|
{
|
78
90
|
"description": "find smallest palindrome from four digit factors",
|
79
91
|
"property": "smallest",
|
80
|
-
"
|
81
|
-
|
92
|
+
"input": {
|
93
|
+
"min": 1000,
|
94
|
+
"max": 9999
|
95
|
+
},
|
82
96
|
"expected": {
|
83
97
|
"value": 1002001,
|
84
98
|
"factors": [
|
@@ -89,8 +103,10 @@
|
|
89
103
|
{
|
90
104
|
"description": "find the largest palindrome from four digit factors",
|
91
105
|
"property": "largest",
|
92
|
-
"
|
93
|
-
|
106
|
+
"input": {
|
107
|
+
"min": 1000,
|
108
|
+
"max": 9999
|
109
|
+
},
|
94
110
|
"expected": {
|
95
111
|
"value": 99000099,
|
96
112
|
"factors": [
|
@@ -101,8 +117,10 @@
|
|
101
117
|
{
|
102
118
|
"description": "empty result for smallest if no palindrome in the range",
|
103
119
|
"property": "smallest",
|
104
|
-
"
|
105
|
-
|
120
|
+
"input": {
|
121
|
+
"min": 1002,
|
122
|
+
"max": 1003
|
123
|
+
},
|
106
124
|
"expected": {
|
107
125
|
"error": "no palindrome with factors in the range 1002 to 1003"
|
108
126
|
}
|
@@ -110,8 +128,10 @@
|
|
110
128
|
{
|
111
129
|
"description": "empty result for largest if no palindrome in the range",
|
112
130
|
"property": "largest",
|
113
|
-
"
|
114
|
-
|
131
|
+
"input": {
|
132
|
+
"min": 15,
|
133
|
+
"max": 15
|
134
|
+
},
|
115
135
|
"expected": {
|
116
136
|
"error": "no palindrome with factors in the range 15 to 15"
|
117
137
|
}
|
@@ -119,8 +139,10 @@
|
|
119
139
|
{
|
120
140
|
"description": "error result for smallest if min is more than max",
|
121
141
|
"property": "smallest",
|
122
|
-
"
|
123
|
-
|
142
|
+
"input": {
|
143
|
+
"min": 10000,
|
144
|
+
"max": 1
|
145
|
+
},
|
124
146
|
"expected": {
|
125
147
|
"error": "invalid input: min is 10000 and max is 1"
|
126
148
|
}
|
@@ -128,8 +150,10 @@
|
|
128
150
|
{
|
129
151
|
"description": "error result for largest if min is more than max",
|
130
152
|
"property": "largest",
|
131
|
-
"
|
132
|
-
|
153
|
+
"input": {
|
154
|
+
"min": 2,
|
155
|
+
"max": 1
|
156
|
+
},
|
133
157
|
"expected": {
|
134
158
|
"error": "invalid input: min is 2 and max is 1"
|
135
159
|
}
|
@@ -1,13 +1,15 @@
|
|
1
1
|
{
|
2
2
|
"exercise": "poker",
|
3
|
-
"version": "1.
|
3
|
+
"version": "1.1.0",
|
4
4
|
"cases": [
|
5
5
|
{
|
6
6
|
"description": "single hand always wins",
|
7
7
|
"property": "bestHands",
|
8
|
-
"input":
|
9
|
-
"
|
10
|
-
|
8
|
+
"input": {
|
9
|
+
"hands": [
|
10
|
+
"4S 5S 7H 8D JC"
|
11
|
+
]
|
12
|
+
},
|
11
13
|
"expected": [
|
12
14
|
"4S 5S 7H 8D JC"
|
13
15
|
]
|
@@ -15,11 +17,13 @@
|
|
15
17
|
{
|
16
18
|
"description": "highest card out of all hands wins",
|
17
19
|
"property": "bestHands",
|
18
|
-
"input":
|
19
|
-
"
|
20
|
-
|
21
|
-
|
22
|
-
|
20
|
+
"input": {
|
21
|
+
"hands": [
|
22
|
+
"4D 5S 6S 8D 3C",
|
23
|
+
"2S 4C 7S 9H 10H",
|
24
|
+
"3S 4S 5D 6H JH"
|
25
|
+
]
|
26
|
+
},
|
23
27
|
"expected": [
|
24
28
|
"3S 4S 5D 6H JH"
|
25
29
|
]
|
@@ -27,12 +31,14 @@
|
|
27
31
|
{
|
28
32
|
"description": "a tie has multiple winners",
|
29
33
|
"property": "bestHands",
|
30
|
-
"input":
|
31
|
-
"
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
34
|
+
"input": {
|
35
|
+
"hands": [
|
36
|
+
"4D 5S 6S 8D 3C",
|
37
|
+
"2S 4C 7S 9H 10H",
|
38
|
+
"3S 4S 5D 6H JH",
|
39
|
+
"3H 4H 5C 6C JD"
|
40
|
+
]
|
41
|
+
},
|
36
42
|
"expected": [
|
37
43
|
"3S 4S 5D 6H JH",
|
38
44
|
"3H 4H 5C 6C JD"
|
@@ -41,10 +47,12 @@
|
|
41
47
|
{
|
42
48
|
"description": "multiple hands with the same high cards, tie compares next highest ranked, down to last card",
|
43
49
|
"property": "bestHands",
|
44
|
-
"input":
|
45
|
-
"
|
46
|
-
|
47
|
-
|
50
|
+
"input": {
|
51
|
+
"hands": [
|
52
|
+
"3S 5H 6S 8D 7H",
|
53
|
+
"2S 5D 6D 8C 7S"
|
54
|
+
]
|
55
|
+
},
|
48
56
|
"expected": [
|
49
57
|
"3S 5H 6S 8D 7H"
|
50
58
|
]
|
@@ -52,10 +60,12 @@
|
|
52
60
|
{
|
53
61
|
"description": "one pair beats high card",
|
54
62
|
"property": "bestHands",
|
55
|
-
"input":
|
56
|
-
"
|
57
|
-
|
58
|
-
|
63
|
+
"input": {
|
64
|
+
"hands": [
|
65
|
+
"4S 5H 6C 8D KH",
|
66
|
+
"2S 4H 6S 4D JH"
|
67
|
+
]
|
68
|
+
},
|
59
69
|
"expected": [
|
60
70
|
"2S 4H 6S 4D JH"
|
61
71
|
]
|
@@ -63,10 +73,12 @@
|
|
63
73
|
{
|
64
74
|
"description": "highest pair wins",
|
65
75
|
"property": "bestHands",
|
66
|
-
"input":
|
67
|
-
"
|
68
|
-
|
69
|
-
|
76
|
+
"input": {
|
77
|
+
"hands": [
|
78
|
+
"4S 2H 6S 2D JH",
|
79
|
+
"2S 4H 6C 4D JD"
|
80
|
+
]
|
81
|
+
},
|
70
82
|
"expected": [
|
71
83
|
"2S 4H 6C 4D JD"
|
72
84
|
]
|
@@ -74,10 +86,12 @@
|
|
74
86
|
{
|
75
87
|
"description": "two pairs beats one pair",
|
76
88
|
"property": "bestHands",
|
77
|
-
"input":
|
78
|
-
"
|
79
|
-
|
80
|
-
|
89
|
+
"input": {
|
90
|
+
"hands": [
|
91
|
+
"2S 8H 6S 8D JH",
|
92
|
+
"4S 5H 4C 8C 5C"
|
93
|
+
]
|
94
|
+
},
|
81
95
|
"expected": [
|
82
96
|
"4S 5H 4C 8C 5C"
|
83
97
|
]
|
@@ -85,10 +99,12 @@
|
|
85
99
|
{
|
86
100
|
"description": "both hands have two pairs, highest ranked pair wins",
|
87
101
|
"property": "bestHands",
|
88
|
-
"input":
|
89
|
-
"
|
90
|
-
|
91
|
-
|
102
|
+
"input": {
|
103
|
+
"hands": [
|
104
|
+
"2S 8H 2D 8D 3H",
|
105
|
+
"4S 5H 4C 8S 5D"
|
106
|
+
]
|
107
|
+
},
|
92
108
|
"expected": [
|
93
109
|
"2S 8H 2D 8D 3H"
|
94
110
|
]
|
@@ -96,10 +112,12 @@
|
|
96
112
|
{
|
97
113
|
"description": "both hands have two pairs, with the same highest ranked pair, tie goes to low pair",
|
98
114
|
"property": "bestHands",
|
99
|
-
"input":
|
100
|
-
"
|
101
|
-
|
102
|
-
|
115
|
+
"input": {
|
116
|
+
"hands": [
|
117
|
+
"2S QS 2C QD JH",
|
118
|
+
"JD QH JS 8D QC"
|
119
|
+
]
|
120
|
+
},
|
103
121
|
"expected": [
|
104
122
|
"JD QH JS 8D QC"
|
105
123
|
]
|
@@ -107,10 +125,12 @@
|
|
107
125
|
{
|
108
126
|
"description": "both hands have two identically ranked pairs, tie goes to remaining card (kicker)",
|
109
127
|
"property": "bestHands",
|
110
|
-
"input":
|
111
|
-
"
|
112
|
-
|
113
|
-
|
128
|
+
"input": {
|
129
|
+
"hands": [
|
130
|
+
"JD QH JS 8D QC",
|
131
|
+
"JS QS JC 2D QD"
|
132
|
+
]
|
133
|
+
},
|
114
134
|
"expected": [
|
115
135
|
"JD QH JS 8D QC"
|
116
136
|
]
|
@@ -118,10 +138,12 @@
|
|
118
138
|
{
|
119
139
|
"description": "three of a kind beats two pair",
|
120
140
|
"property": "bestHands",
|
121
|
-
"input":
|
122
|
-
"
|
123
|
-
|
124
|
-
|
141
|
+
"input": {
|
142
|
+
"hands": [
|
143
|
+
"2S 8H 2H 8D JH",
|
144
|
+
"4S 5H 4C 8S 4H"
|
145
|
+
]
|
146
|
+
},
|
125
147
|
"expected": [
|
126
148
|
"4S 5H 4C 8S 4H"
|
127
149
|
]
|
@@ -129,10 +151,12 @@
|
|
129
151
|
{
|
130
152
|
"description": "both hands have three of a kind, tie goes to highest ranked triplet",
|
131
153
|
"property": "bestHands",
|
132
|
-
"input":
|
133
|
-
"
|
134
|
-
|
135
|
-
|
154
|
+
"input": {
|
155
|
+
"hands": [
|
156
|
+
"2S 2H 2C 8D JH",
|
157
|
+
"4S AH AS 8C AD"
|
158
|
+
]
|
159
|
+
},
|
136
160
|
"expected": [
|
137
161
|
"4S AH AS 8C AD"
|
138
162
|
]
|
@@ -140,10 +164,12 @@
|
|
140
164
|
{
|
141
165
|
"description": "with multiple decks, two players can have same three of a kind, ties go to highest remaining cards",
|
142
166
|
"property": "bestHands",
|
143
|
-
"input":
|
144
|
-
"
|
145
|
-
|
146
|
-
|
167
|
+
"input": {
|
168
|
+
"hands": [
|
169
|
+
"4S AH AS 7C AD",
|
170
|
+
"4S AH AS 8C AD"
|
171
|
+
]
|
172
|
+
},
|
147
173
|
"expected": [
|
148
174
|
"4S AH AS 8C AD"
|
149
175
|
]
|
@@ -151,10 +177,12 @@
|
|
151
177
|
{
|
152
178
|
"description": "a straight beats three of a kind",
|
153
179
|
"property": "bestHands",
|
154
|
-
"input":
|
155
|
-
"
|
156
|
-
|
157
|
-
|
180
|
+
"input": {
|
181
|
+
"hands": [
|
182
|
+
"4S 5H 4C 8D 4H",
|
183
|
+
"3S 4D 2S 6D 5C"
|
184
|
+
]
|
185
|
+
},
|
158
186
|
"expected": [
|
159
187
|
"3S 4D 2S 6D 5C"
|
160
188
|
]
|
@@ -162,10 +190,12 @@
|
|
162
190
|
{
|
163
191
|
"description": "aces can end a straight (10 J Q K A)",
|
164
192
|
"property": "bestHands",
|
165
|
-
"input":
|
166
|
-
"
|
167
|
-
|
168
|
-
|
193
|
+
"input": {
|
194
|
+
"hands": [
|
195
|
+
"4S 5H 4C 8D 4H",
|
196
|
+
"10D JH QS KD AC"
|
197
|
+
]
|
198
|
+
},
|
169
199
|
"expected": [
|
170
200
|
"10D JH QS KD AC"
|
171
201
|
]
|
@@ -173,10 +203,12 @@
|
|
173
203
|
{
|
174
204
|
"description": "aces can start a straight (A 2 3 4 5)",
|
175
205
|
"property": "bestHands",
|
176
|
-
"input":
|
177
|
-
"
|
178
|
-
|
179
|
-
|
206
|
+
"input": {
|
207
|
+
"hands": [
|
208
|
+
"4S 5H 4C 8D 4H",
|
209
|
+
"4D AH 3S 2D 5C"
|
210
|
+
]
|
211
|
+
},
|
180
212
|
"expected": [
|
181
213
|
"4D AH 3S 2D 5C"
|
182
214
|
]
|
@@ -184,10 +216,12 @@
|
|
184
216
|
{
|
185
217
|
"description": "both hands with a straight, tie goes to highest ranked card",
|
186
218
|
"property": "bestHands",
|
187
|
-
"input":
|
188
|
-
"
|
189
|
-
|
190
|
-
|
219
|
+
"input": {
|
220
|
+
"hands": [
|
221
|
+
"4S 6C 7S 8D 5H",
|
222
|
+
"5S 7H 8S 9D 6H"
|
223
|
+
]
|
224
|
+
},
|
191
225
|
"expected": [
|
192
226
|
"5S 7H 8S 9D 6H"
|
193
227
|
]
|
@@ -195,10 +229,12 @@
|
|
195
229
|
{
|
196
230
|
"description": "even though an ace is usually high, a 5-high straight is the lowest-scoring straight",
|
197
231
|
"property": "bestHands",
|
198
|
-
"input":
|
199
|
-
"
|
200
|
-
|
201
|
-
|
232
|
+
"input": {
|
233
|
+
"hands": [
|
234
|
+
"2H 3C 4D 5D 6H",
|
235
|
+
"4S AH 3S 2D 5H"
|
236
|
+
]
|
237
|
+
},
|
202
238
|
"expected": [
|
203
239
|
"2H 3C 4D 5D 6H"
|
204
240
|
]
|
@@ -206,10 +242,12 @@
|
|
206
242
|
{
|
207
243
|
"description": "flush beats a straight",
|
208
244
|
"property": "bestHands",
|
209
|
-
"input":
|
210
|
-
"
|
211
|
-
|
212
|
-
|
245
|
+
"input": {
|
246
|
+
"hands": [
|
247
|
+
"4C 6H 7D 8D 5H",
|
248
|
+
"2S 4S 5S 6S 7S"
|
249
|
+
]
|
250
|
+
},
|
213
251
|
"expected": [
|
214
252
|
"2S 4S 5S 6S 7S"
|
215
253
|
]
|
@@ -217,10 +255,12 @@
|
|
217
255
|
{
|
218
256
|
"description": "both hands have a flush, tie goes to high card, down to the last one if necessary",
|
219
257
|
"property": "bestHands",
|
220
|
-
"input":
|
221
|
-
"
|
222
|
-
|
223
|
-
|
258
|
+
"input": {
|
259
|
+
"hands": [
|
260
|
+
"4H 7H 8H 9H 6H",
|
261
|
+
"2S 4S 5S 6S 7S"
|
262
|
+
]
|
263
|
+
},
|
224
264
|
"expected": [
|
225
265
|
"4H 7H 8H 9H 6H"
|
226
266
|
]
|
@@ -228,10 +268,12 @@
|
|
228
268
|
{
|
229
269
|
"description": "full house beats a flush",
|
230
270
|
"property": "bestHands",
|
231
|
-
"input":
|
232
|
-
"
|
233
|
-
|
234
|
-
|
271
|
+
"input": {
|
272
|
+
"hands": [
|
273
|
+
"3H 6H 7H 8H 5H",
|
274
|
+
"4S 5H 4C 5D 4H"
|
275
|
+
]
|
276
|
+
},
|
235
277
|
"expected": [
|
236
278
|
"4S 5H 4C 5D 4H"
|
237
279
|
]
|
@@ -239,10 +281,12 @@
|
|
239
281
|
{
|
240
282
|
"description": "both hands have a full house, tie goes to highest-ranked triplet",
|
241
283
|
"property": "bestHands",
|
242
|
-
"input":
|
243
|
-
"
|
244
|
-
|
245
|
-
|
284
|
+
"input": {
|
285
|
+
"hands": [
|
286
|
+
"4H 4S 4D 9S 9D",
|
287
|
+
"5H 5S 5D 8S 8D"
|
288
|
+
]
|
289
|
+
},
|
246
290
|
"expected": [
|
247
291
|
"5H 5S 5D 8S 8D"
|
248
292
|
]
|
@@ -250,10 +294,12 @@
|
|
250
294
|
{
|
251
295
|
"description": "with multiple decks, both hands have a full house with the same triplet, tie goes to the pair",
|
252
296
|
"property": "bestHands",
|
253
|
-
"input":
|
254
|
-
"
|
255
|
-
|
256
|
-
|
297
|
+
"input": {
|
298
|
+
"hands": [
|
299
|
+
"5H 5S 5D 9S 9D",
|
300
|
+
"5H 5S 5D 8S 8D"
|
301
|
+
]
|
302
|
+
},
|
257
303
|
"expected": [
|
258
304
|
"5H 5S 5D 9S 9D"
|
259
305
|
]
|
@@ -261,10 +307,12 @@
|
|
261
307
|
{
|
262
308
|
"description": "four of a kind beats a full house",
|
263
309
|
"property": "bestHands",
|
264
|
-
"input":
|
265
|
-
"
|
266
|
-
|
267
|
-
|
310
|
+
"input": {
|
311
|
+
"hands": [
|
312
|
+
"4S 5H 4D 5D 4H",
|
313
|
+
"3S 3H 2S 3D 3C"
|
314
|
+
]
|
315
|
+
},
|
268
316
|
"expected": [
|
269
317
|
"3S 3H 2S 3D 3C"
|
270
318
|
]
|
@@ -272,10 +320,12 @@
|
|
272
320
|
{
|
273
321
|
"description": "both hands have four of a kind, tie goes to high quad",
|
274
322
|
"property": "bestHands",
|
275
|
-
"input":
|
276
|
-
"
|
277
|
-
|
278
|
-
|
323
|
+
"input": {
|
324
|
+
"hands": [
|
325
|
+
"2S 2H 2C 8D 2D",
|
326
|
+
"4S 5H 5S 5D 5C"
|
327
|
+
]
|
328
|
+
},
|
279
329
|
"expected": [
|
280
330
|
"4S 5H 5S 5D 5C"
|
281
331
|
]
|
@@ -283,10 +333,12 @@
|
|
283
333
|
{
|
284
334
|
"description": "with multiple decks, both hands with identical four of a kind, tie determined by kicker" ,
|
285
335
|
"property": "bestHands",
|
286
|
-
"input":
|
287
|
-
"
|
288
|
-
|
289
|
-
|
336
|
+
"input": {
|
337
|
+
"hands": [
|
338
|
+
"3S 3H 2S 3D 3C",
|
339
|
+
"3S 3H 4S 3D 3C"
|
340
|
+
]
|
341
|
+
},
|
290
342
|
"expected": [
|
291
343
|
"3S 3H 4S 3D 3C"
|
292
344
|
]
|
@@ -294,10 +346,12 @@
|
|
294
346
|
{
|
295
347
|
"description": "straight flush beats four of a kind",
|
296
348
|
"property": "bestHands",
|
297
|
-
"input":
|
298
|
-
"
|
299
|
-
|
300
|
-
|
349
|
+
"input": {
|
350
|
+
"hands": [
|
351
|
+
"4S 5H 5S 5D 5C",
|
352
|
+
"7S 8S 9S 6S 10S"
|
353
|
+
]
|
354
|
+
},
|
301
355
|
"expected": [
|
302
356
|
"7S 8S 9S 6S 10S"
|
303
357
|
]
|
@@ -305,10 +359,12 @@
|
|
305
359
|
{
|
306
360
|
"description": "both hands have straight flush, tie goes to highest-ranked card",
|
307
361
|
"property": "bestHands",
|
308
|
-
"input":
|
309
|
-
"
|
310
|
-
|
311
|
-
|
362
|
+
"input": {
|
363
|
+
"hands": [
|
364
|
+
"4H 6H 7H 8H 5H",
|
365
|
+
"5S 7S 8S 9S 6S"
|
366
|
+
]
|
367
|
+
},
|
312
368
|
"expected": [
|
313
369
|
"5S 7S 8S 9S 6S"
|
314
370
|
]
|