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.
Files changed (204) hide show
  1. checksums.yaml +4 -4
  2. data/lib/trackler/version.rb +1 -1
  3. data/problem-specifications/exercises/kindergarten-garden/canonical-data.json +37 -19
  4. data/problem-specifications/exercises/ocr-numbers/canonical-data.json +144 -110
  5. data/problem-specifications/exercises/palindrome-products/canonical-data.json +49 -25
  6. data/problem-specifications/exercises/poker/canonical-data.json +171 -115
  7. data/problem-specifications/exercises/prime-factors/canonical-data.json +22 -8
  8. data/problem-specifications/exercises/protein-translation/canonical-data.json +70 -24
  9. data/problem-specifications/exercises/proverb/canonical-data.json +24 -12
  10. data/problem-specifications/exercises/queen-attack/canonical-data.json +115 -91
  11. data/problem-specifications/exercises/rail-fence-cipher/canonical-data.json +25 -13
  12. data/problem-specifications/exercises/raindrops/canonical-data.json +55 -19
  13. data/problem-specifications/exercises/rational-numbers/canonical-data.json +374 -0
  14. data/problem-specifications/exercises/rational-numbers/description.md +27 -0
  15. data/problem-specifications/exercises/rational-numbers/metadata.yml +4 -0
  16. data/problem-specifications/exercises/rectangles/canonical-data.json +93 -67
  17. data/problem-specifications/exercises/reverse-string/canonical-data.json +16 -6
  18. data/problem-specifications/exercises/rna-transcription/metadata.yml +3 -3
  19. data/problem-specifications/exercises/roman-numerals/canonical-data.json +10 -2
  20. data/tracks/bash/config.json +11 -11
  21. data/tracks/c/exercises/roman-numerals/test/test_roman_numerals.c +7 -0
  22. data/tracks/clojure/exercises/armstrong-numbers/README.md +1 -1
  23. data/tracks/delphi/config.json +11 -0
  24. data/tracks/delphi/exercises/clock/uClockExample.pas +6 -1
  25. data/tracks/delphi/exercises/clock/uClockTest.pas +22 -19
  26. data/tracks/delphi/exercises/isbn-verifier/README.md +1 -1
  27. data/tracks/delphi/exercises/reverse-string/README.md +1 -1
  28. data/tracks/delphi/exercises/rna-transcription/README.md +1 -1
  29. data/tracks/delphi/exercises/roman-numerals/uRomanNumeralsTest.pas +14 -0
  30. data/tracks/delphi/exercises/space-age/README.md +45 -0
  31. data/tracks/delphi/exercises/space-age/SpaceAge.dpr +60 -0
  32. data/tracks/delphi/exercises/space-age/uSpaceAgeExample.pas +120 -0
  33. data/tracks/delphi/exercises/space-age/uSpaceAgeTests.pas +135 -0
  34. data/tracks/delphi/exercises/two-fer/README.md +1 -1
  35. data/tracks/elixir/exercises/nth-prime/nth_prime.exs +0 -1
  36. data/tracks/fsharp/exercises/pov/PovTest.fs +66 -53
  37. data/tracks/fsharp/exercises/space-age/Example.fs +11 -11
  38. data/tracks/fsharp/exercises/space-age/SpaceAge.fs +1 -1
  39. data/tracks/fsharp/exercises/space-age/SpaceAgeTest.fs +21 -34
  40. data/tracks/fsharp/exercises/triangle/Example.fs +11 -16
  41. data/tracks/fsharp/exercises/triangle/Triangle.fs +4 -5
  42. data/tracks/fsharp/exercises/triangle/TriangleTest.fs +44 -31
  43. data/tracks/fsharp/generators/Generators.fs +121 -0
  44. data/tracks/go/config.json +12 -0
  45. data/tracks/go/exercises/clock/.meta/gen.go +37 -13
  46. data/tracks/go/exercises/clock/cases_test.go +10 -10
  47. data/tracks/go/exercises/clock/clock_test.go +16 -2
  48. data/tracks/go/exercises/clock/example.go +4 -0
  49. data/tracks/go/exercises/clock/example_clock_test.go +3 -3
  50. data/tracks/go/exercises/parallel-letter-frequency/.meta/hints.md +33 -0
  51. data/tracks/go/exercises/parallel-letter-frequency/README.md +35 -0
  52. data/tracks/go/exercises/raindrops/.meta/hints.md +7 -4
  53. data/tracks/go/exercises/raindrops/README.md +12 -0
  54. data/tracks/go/exercises/roman-numerals/.meta/gen.go +4 -2
  55. data/tracks/go/exercises/roman-numerals/cases_test.go +3 -2
  56. data/tracks/go/exercises/space-age/.meta/hints.md +10 -0
  57. data/tracks/go/exercises/space-age/README.md +14 -1
  58. data/tracks/go/exercises/twelve-days/README.md +2 -5
  59. data/tracks/go/exercises/two-bucket/.meta/gen.go +62 -0
  60. data/tracks/go/exercises/two-bucket/.meta/hints.md +16 -0
  61. data/tracks/go/exercises/two-bucket/README.md +72 -0
  62. data/tracks/go/exercises/two-bucket/cases_test.go +44 -0
  63. data/tracks/go/exercises/two-bucket/example.go +198 -0
  64. data/tracks/go/exercises/two-bucket/two_bucket_test.go +61 -0
  65. data/tracks/idris/.travis.yml +3 -2
  66. data/tracks/idris/bin/fetch-idris-testing.sh +11 -0
  67. data/tracks/idris/bin/solve_exercises.sh +2 -2
  68. data/tracks/idris/config.json +11 -0
  69. data/tracks/idris/config/exercise_readme.go.tmpl +0 -3
  70. data/tracks/idris/docs/INSTALLATION.md +22 -0
  71. data/tracks/idris/docs/TESTS.md +12 -4
  72. data/tracks/idris/exercises/accumulate/src/Accumulate.idr +5 -0
  73. data/tracks/idris/exercises/hamming/Hamming.ipkg +2 -0
  74. data/tracks/idris/exercises/hamming/src/{example.idr → Example.idr} +5 -1
  75. data/tracks/idris/exercises/hamming/src/Hamming.idr +13 -5
  76. data/tracks/idris/exercises/hamming/src/Test/Hamming.idr +31 -58
  77. data/tracks/idris/exercises/hello-world/HelloWorld.ipkg +2 -0
  78. data/tracks/idris/exercises/hello-world/src/Example.idr +9 -0
  79. data/tracks/idris/exercises/hello-world/src/HelloWorld.idr +6 -1
  80. data/tracks/idris/exercises/hello-world/src/Test/HelloWorld.idr +18 -18
  81. data/tracks/idris/exercises/leap/Leap.ipkg +2 -0
  82. data/tracks/idris/exercises/leap/src/{example.idr → Example.idr} +4 -0
  83. data/tracks/idris/exercises/leap/src/Leap.idr +5 -1
  84. data/tracks/idris/exercises/leap/src/Test/Leap.idr +21 -30
  85. data/tracks/idris/exercises/rna-transcription/Makefile +23 -0
  86. data/tracks/idris/exercises/rna-transcription/README.md +27 -0
  87. data/tracks/idris/exercises/rna-transcription/RnaTranscription.ipkg +5 -0
  88. data/tracks/idris/exercises/rna-transcription/src/RnaTranscription.idr +17 -0
  89. data/tracks/idris/exercises/rna-transcription/src/Test/RnaTranscription.idr +27 -0
  90. data/tracks/idris/exercises/rna-transcription/src/example.idr +35 -0
  91. data/tracks/java/exercises/etl/.meta/version +1 -0
  92. data/tracks/java/exercises/gigasecond/.meta/version +1 -0
  93. data/tracks/java/exercises/isbn-verifier/README.md +1 -1
  94. data/tracks/java/exercises/nucleotide-count/.meta/src/reference/java/NucleotideCounter.java +7 -1
  95. data/tracks/java/exercises/nucleotide-count/.meta/version +1 -0
  96. data/tracks/java/exercises/nucleotide-count/src/test/java/NucleotideCounterTest.java +19 -54
  97. data/tracks/java/exercises/proverb/.meta/version +1 -0
  98. data/tracks/java/exercises/reverse-string/README.md +1 -1
  99. data/tracks/java/exercises/rna-transcription/README.md +1 -1
  100. data/tracks/java/exercises/sum-of-multiples/.meta/version +1 -0
  101. data/tracks/java/exercises/sum-of-multiples/src/test/java/SumOfMultiplesTest.java +13 -1
  102. data/tracks/kotlin/config/exercise_readme.go.tmpl +0 -3
  103. data/tracks/kotlin/docs/TESTS.md +1 -1
  104. data/tracks/objective-c/config.json +11 -0
  105. data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureExample.h +7 -0
  106. data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureExample.m +26 -0
  107. data/tracks/objective-c/exercises/collatz-conjecture/CollatzConjectureTest.m +39 -0
  108. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/project.pbxproj +31 -1
  109. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/xcshareddata/xcschemes/OCLint.xcscheme +3 -1
  110. data/tracks/objective-c/xcodeProject/ObjectiveC.xcodeproj/xcshareddata/xcschemes/xobjectivecTest.xcscheme +3 -1
  111. data/tracks/ocaml/exercises/forth/example.ml +9 -9
  112. data/tracks/ocaml/tools/test-generator/Makefile +3 -9
  113. data/tracks/ocaml/tools/test-generator/src/test_gen.ml +18 -16
  114. data/tracks/perl6/exercises/acronym/.meta/exercise-data.yaml +1 -1
  115. data/tracks/perl6/exercises/acronym/acronym.t +4 -14
  116. data/tracks/perl6/exercises/all-your-base/all-your-base.t +0 -2
  117. data/tracks/perl6/exercises/allergies/allergies.t +0 -2
  118. data/tracks/perl6/exercises/anagram/.meta/exercise-data.yaml +1 -1
  119. data/tracks/perl6/exercises/anagram/anagram.t +2 -40
  120. data/tracks/perl6/exercises/atbash-cipher/atbash-cipher.t +0 -1
  121. data/tracks/perl6/exercises/bob/bob.t +0 -2
  122. data/tracks/perl6/exercises/clock/.meta/exercise-data.yaml +15 -11
  123. data/tracks/perl6/exercises/clock/.meta/solutions/Clock.pm6 +5 -1
  124. data/tracks/perl6/exercises/clock/Clock.pm6 +1 -1
  125. data/tracks/perl6/exercises/clock/clock.t +314 -217
  126. data/tracks/perl6/exercises/etl/etl.t +0 -2
  127. data/tracks/perl6/exercises/flatten-array/flatten-array.t +0 -2
  128. data/tracks/perl6/exercises/grains/grains.t +0 -2
  129. data/tracks/perl6/exercises/hamming/.meta/exercise-data.yaml +2 -2
  130. data/tracks/perl6/exercises/hamming/hamming.t +63 -35
  131. data/tracks/perl6/exercises/hello-world/hello-world.t +2 -3
  132. data/tracks/perl6/exercises/leap/.meta/exercise-data.yaml +1 -1
  133. data/tracks/perl6/exercises/leap/leap.t +14 -8
  134. data/tracks/perl6/exercises/luhn/luhn.t +0 -2
  135. data/tracks/perl6/exercises/nucleotide-count/.meta/exercise-data.yaml +2 -2
  136. data/tracks/perl6/exercises/nucleotide-count/nucleotide-count.t +18 -10
  137. data/tracks/perl6/exercises/pangram/.meta/exercise-data.yaml +1 -1
  138. data/tracks/perl6/exercises/pangram/pangram.t +32 -14
  139. data/tracks/perl6/exercises/phone-number/.meta/exercise-data.yaml +4 -4
  140. data/tracks/perl6/exercises/phone-number/.meta/solutions/Phone.pm6 +1 -1
  141. data/tracks/perl6/exercises/phone-number/Phone.pm6 +1 -1
  142. data/tracks/perl6/exercises/phone-number/phone-number.t +59 -21
  143. data/tracks/perl6/exercises/raindrops/raindrops.t +0 -2
  144. data/tracks/perl6/exercises/rna-transcription/.meta/exercise-data.yaml +1 -1
  145. data/tracks/perl6/exercises/rna-transcription/README.md +1 -1
  146. data/tracks/perl6/exercises/rna-transcription/rna-transcription.t +17 -9
  147. data/tracks/perl6/exercises/roman-numerals/.meta/exercise-data.yaml +3 -3
  148. data/tracks/perl6/exercises/roman-numerals/.meta/solutions/RomanNumerals.pm6 +1 -1
  149. data/tracks/perl6/exercises/roman-numerals/RomanNumerals.pm6 +1 -1
  150. data/tracks/perl6/exercises/roman-numerals/roman-numerals.t +66 -24
  151. data/tracks/perl6/exercises/scrabble-score/.meta/exercise-data.yaml +1 -1
  152. data/tracks/perl6/exercises/scrabble-score/scrabble-score.t +35 -15
  153. data/tracks/perl6/exercises/space-age/.meta/exercise-data.yaml +1 -1
  154. data/tracks/perl6/exercises/space-age/space-age.t +34 -20
  155. data/tracks/perl6/exercises/two-fer/.meta/exercise-data.yaml +2 -2
  156. data/tracks/perl6/exercises/two-fer/two-fer.t +15 -11
  157. data/tracks/perl6/exercises/word-count/.meta/exercise-data.yaml +1 -1
  158. data/tracks/perl6/exercises/word-count/word-count.t +46 -26
  159. data/tracks/perl6/exercises/wordy/.meta/exercise-data.yaml +2 -2
  160. data/tracks/perl6/exercises/wordy/wordy.t +51 -21
  161. data/tracks/perl6/lib/Exercism/Generator.pm6 +1 -1
  162. data/tracks/perl6/t/generated-tests.t +1 -1
  163. data/tracks/perl6/templates/test.mustache +0 -1
  164. data/tracks/python/config.json +12 -0
  165. data/tracks/python/exercises/forth/example.py +1 -1
  166. data/tracks/python/exercises/forth/forth_test.py +43 -38
  167. data/tracks/python/exercises/spiral-matrix/README.md +42 -0
  168. data/tracks/python/exercises/spiral-matrix/example.py +11 -0
  169. data/tracks/python/exercises/spiral-matrix/spiral_matrix.py +2 -0
  170. data/tracks/python/exercises/spiral-matrix/spiral_matrix_test.py +40 -0
  171. data/tracks/racket/config/exercise_readme.go.tmpl +24 -4
  172. data/tracks/racket/exercises/accumulate/README.md +3 -6
  173. data/tracks/racket/exercises/acronym/README.md +3 -4
  174. data/tracks/racket/exercises/allergies/README.md +3 -4
  175. data/tracks/racket/exercises/anagram/README.md +3 -3
  176. data/tracks/racket/exercises/bob/README.md +5 -3
  177. data/tracks/racket/exercises/collatz-conjecture/README.md +3 -3
  178. data/tracks/racket/exercises/difference-of-squares/README.md +3 -3
  179. data/tracks/racket/exercises/etl/README.md +6 -4
  180. data/tracks/racket/exercises/gigasecond/README.md +3 -3
  181. data/tracks/racket/exercises/grains/README.md +3 -4
  182. data/tracks/racket/exercises/grep/README.md +15 -15
  183. data/tracks/racket/exercises/hamming/README.md +3 -3
  184. data/tracks/racket/exercises/hello-world/README.md +1 -1
  185. data/tracks/racket/exercises/leap/README.md +4 -4
  186. data/tracks/racket/exercises/list-ops/README.md +3 -4
  187. data/tracks/racket/exercises/meetup/README.md +19 -15
  188. data/tracks/racket/exercises/nucleotide-count/README.md +11 -25
  189. data/tracks/racket/exercises/perfect-numbers/README.md +5 -5
  190. data/tracks/racket/exercises/phone-number/README.md +7 -6
  191. data/tracks/racket/exercises/raindrops/README.md +3 -3
  192. data/tracks/racket/exercises/rna-transcription/README.md +4 -4
  193. data/tracks/racket/exercises/roman-numerals/README.md +4 -4
  194. data/tracks/racket/exercises/say/README.md +3 -3
  195. data/tracks/racket/exercises/scrabble-score/README.md +6 -4
  196. data/tracks/racket/exercises/word-count/README.md +4 -5
  197. data/tracks/scheme/config/exercise_readme.go.tmpl +0 -3
  198. data/tracks/scheme/docs/INSTALLATION.md +23 -14
  199. metadata +40 -9
  200. data/tracks/idris/docs/EXERCISE_README_INSERT.md +0 -0
  201. data/tracks/idris/exercises/hello-world/src/example.idr +0 -5
  202. data/tracks/kotlin/config/exercise-readme-insert.md +0 -1
  203. data/tracks/racket/docs/EXERCISE_README_INSERT.md +0 -23
  204. data/tracks/scheme/docs/EXERCISE_README_INSERT.md +0 -0
@@ -1,11 +1,13 @@
1
1
  {
2
2
  "exercise": "palindrome-products",
3
- "version": "1.0.0",
3
+ "version": "1.1.0",
4
4
  "cases": [{
5
5
  "description": "finds the smallest palindrome from single digit factors",
6
6
  "property": "smallest",
7
- "input_min": 1,
8
- "input_max": 9,
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
- "input_min": 1,
20
- "input_max": 9,
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
- "input_min": 10,
33
- "input_max": 99,
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
- "input_min": 10,
45
- "input_max": 99,
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
- "input_min": 100,
57
- "input_max": 999,
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
- "input_min": 100,
69
- "input_max": 999,
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
- "input_min": 1000,
81
- "input_max": 9999,
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
- "input_min": 1000,
93
- "input_max": 9999,
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
- "input_min": 1002,
105
- "input_max": 1003,
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
- "input_min": 15,
114
- "input_max": 15,
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
- "input_min": 10000,
123
- "input_max": 1,
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
- "input_min": 2,
132
- "input_max": 1,
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.0.0",
3
+ "version": "1.1.0",
4
4
  "cases": [
5
5
  {
6
6
  "description": "single hand always wins",
7
7
  "property": "bestHands",
8
- "input": [
9
- "4S 5S 7H 8D JC"
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
- "4D 5S 6S 8D 3C",
20
- "2S 4C 7S 9H 10H",
21
- "3S 4S 5D 6H JH"
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
- "4D 5S 6S 8D 3C",
32
- "2S 4C 7S 9H 10H",
33
- "3S 4S 5D 6H JH",
34
- "3H 4H 5C 6C JD"
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
- "3S 5H 6S 8D 7H",
46
- "2S 5D 6D 8C 7S"
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
- "4S 5H 6C 8D KH",
57
- "2S 4H 6S 4D JH"
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
- "4S 2H 6S 2D JH",
68
- "2S 4H 6C 4D JD"
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
- "2S 8H 6S 8D JH",
79
- "4S 5H 4C 8C 5C"
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
- "2S 8H 2D 8D 3H",
90
- "4S 5H 4C 8S 5D"
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
- "2S QS 2C QD JH",
101
- "JD QH JS 8D QC"
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
- "JD QH JS 8D QC",
112
- "JS QS JC 2D QD"
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
- "2S 8H 2H 8D JH",
123
- "4S 5H 4C 8S 4H"
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
- "2S 2H 2C 8D JH",
134
- "4S AH AS 8C AD"
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
- "4S AH AS 7C AD",
145
- "4S AH AS 8C AD"
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
- "4S 5H 4C 8D 4H",
156
- "3S 4D 2S 6D 5C"
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
- "4S 5H 4C 8D 4H",
167
- "10D JH QS KD AC"
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
- "4S 5H 4C 8D 4H",
178
- "4D AH 3S 2D 5C"
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
- "4S 6C 7S 8D 5H",
189
- "5S 7H 8S 9D 6H"
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
- "2H 3C 4D 5D 6H",
200
- "4S AH 3S 2D 5H"
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
- "4C 6H 7D 8D 5H",
211
- "2S 4S 5S 6S 7S"
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
- "4H 7H 8H 9H 6H",
222
- "2S 4S 5S 6S 7S"
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
- "3H 6H 7H 8H 5H",
233
- "4S 5H 4C 5D 4H"
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
- "4H 4S 4D 9S 9D",
244
- "5H 5S 5D 8S 8D"
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
- "5H 5S 5D 9S 9D",
255
- "5H 5S 5D 8S 8D"
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
- "4S 5H 4D 5D 4H",
266
- "3S 3H 2S 3D 3C"
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
- "2S 2H 2C 8D 2D",
277
- "4S 5H 5S 5D 5C"
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
- "3S 3H 2S 3D 3C",
288
- "3S 3H 4S 3D 3C"
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
- "4S 5H 5S 5D 5C",
299
- "7S 8S 9S 6S 10S"
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
- "4H 6H 7H 8H 5H",
310
- "5S 7S 8S 9S 6S"
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
  ]