@@ -149,6 +149,13 @@ fn test_aces_can_start_a_straight_low() {
149
149
test ( & [ "4S 5H 4C 8D 4H" , "4D AH 3S 2D 5C" ] , & [ "4D AH 3S 2D 5C" ] )
150
150
}
151
151
152
+ #[ test]
153
+ #[ ignore]
154
+ fn test_no_ace_in_middle_of_straight ( ) {
155
+ // aces cannot be in the middle of a straight (Q K A 2 3)
156
+ test ( & [ "2C 3D 7H 5H 2S" , "QS KH AC 2D 3S" ] , & [ "2C 3D 7H 5H 2S" ] )
157
+ }
158
+
152
159
#[ test]
153
160
#[ ignore]
154
161
fn test_straight_ranks ( ) {
@@ -222,9 +229,37 @@ fn test_straight_flush_beats_four_of_a_kind() {
222
229
test ( & [ "4S 5H 5S 5D 5C" , "7S 8S 9S 6S 10S" ] , & [ "7S 8S 9S 6S 10S" ] )
223
230
}
224
231
232
+ #[ test]
233
+ #[ ignore]
234
+ fn test_aces_can_end_a_straight_flush_high ( ) {
235
+ // aces can end a straight flush (10 J Q K A)
236
+ test ( & [ "KC AH AS AD AC" , "10C JC QC KC AC" ] , & [ "10C JC QC KC AC" ] )
237
+ }
238
+
239
+ #[ test]
240
+ #[ ignore]
241
+ fn test_aces_can_start_a_straight_flush_low ( ) {
242
+ // aces can start a straight flush (A 2 3 4 5)
243
+ test ( & [ "KS AH AS AD AC" , "4H AH 3H 2H 5H" ] , & [ "4H AH 3H 2H 5H" ] )
244
+ }
245
+
246
+ #[ test]
247
+ #[ ignore]
248
+ fn test_no_ace_in_middle_of_straight_flush ( ) {
249
+ // aces cannot be in the middle of a straight flush (Q K A 2 3)
250
+ test ( & [ "2C AC QC 10C KC" , "QH KH AH 2H 3H" ] , & [ "2C AC QC 10C KC" ] )
251
+ }
252
+
225
253
#[ test]
226
254
#[ ignore]
227
255
fn test_straight_flush_ranks ( ) {
228
- // both hands have straight flush, tie goes to highest-ranked card
256
+ // both hands have a straight flush, tie goes to highest-ranked card
229
257
test ( & [ "4H 6H 7H 8H 5H" , "5S 7S 8S 9S 6S" ] , & [ "5S 7S 8S 9S 6S" ] )
230
258
}
259
+
260
+ #[ test]
261
+ #[ ignore]
262
+ fn test_straight_flush_scoring ( ) {
263
+ // even though an ace is usually high, a 5-high straight flush is the lowest-scoring straight flush
264
+ test ( & [ "2H 3H 4H 5H 6H" , "4D AD 3D 2D 5D" ] , & [ "2H 3H 4H 5H 6H" ] )
265
+ }
0 commit comments