|
@@ -1337,17 +1337,17 @@ public final class GDUtils {
|
|
|
if (suits.stream().distinct().count() > 1) {
|
|
|
return false; // 花色不相同
|
|
|
}
|
|
|
-
|
|
|
+ // 特殊情况处理:A-2-3-4-5 和 10-J-Q-K-A
|
|
|
+ if (points.contains(14) && points.contains(2)&& points.contains(3) && points.contains(4) && points.contains(5)) {
|
|
|
+ return true; // A-2-3-4-5
|
|
|
+ }
|
|
|
// 检查牌点是否连续
|
|
|
Collections.sort(points);
|
|
|
int gaps = 0;
|
|
|
for (int i = 0; i < points.size() - 1; i++) {
|
|
|
gaps += points.get(i + 1) - points.get(i) - 1;
|
|
|
}
|
|
|
- // 特殊情况处理:A-2-3-4-5 和 10-J-Q-K-A
|
|
|
- if (points.contains(14) && points.contains(2)) {
|
|
|
- return true; // A-2-3-4-5
|
|
|
- }
|
|
|
+
|
|
|
if (points.contains(10) && points.contains(11) && points.contains(12) && points.contains(13) && points.contains(14)) {
|
|
|
return true;
|
|
|
}
|
|
@@ -1388,11 +1388,12 @@ public final class GDUtils {
|
|
|
System.out.println(determineCardType(cards14, 0)); // STRAIGHT
|
|
|
System.out.println(determineCardType(cards15, 0)); // PAIR_SEQUENCE*/
|
|
|
// int[] cards10 = {0x08, 0x18, 0x29, 0x39, 0x45}; // 五炸弹
|
|
|
-// int[] cards = {0x22, 0x23, 0x26, 0x45, 0x45}; // 红桃5-6-7-8-赖子
|
|
|
-// System.out.println(determineCardType(cards, 0x45)); // FIVE_BOMB
|
|
|
+
|
|
|
// int[] cards20 = {0x02, 0x02, 0x02, 0x0e, 0x0e, 0x0e}; // A-A-A-2-2-2
|
|
|
// int[] cards21 = {0x03, 0x03, 0x03, 0x02, 0x02, 0x02}; // 3-3-3-4-4-4
|
|
|
|
|
|
// System.out.println(compareCardStrength(cards20, cards21, 3, CardType.TRIPLE_SEQUENCE, 0));
|
|
|
+ int[] cards = {0x22, 0x23, 0x26, 0x45, 0x45}; // 红桃5-6-7-8-赖子
|
|
|
+ System.out.println(determineCardType(cards, 0x45,null)); // FIVE_BOMB
|
|
|
}
|
|
|
}
|