|
@@ -55,6 +55,9 @@ public class ActionParserUtils {
|
|
|
long id = playerNode.get("id").asLong();
|
|
long id = playerNode.get("id").asLong();
|
|
|
String name = playerNode.get("name").asText();
|
|
String name = playerNode.get("name").asText();
|
|
|
int seat = playerNode.get("seat").asInt();
|
|
int seat = playerNode.get("seat").asInt();
|
|
|
|
|
+ //手牌
|
|
|
|
|
+ String holeCards= playerNode.get("holeCards").asText();
|
|
|
|
|
+ List<String> holeCardsList = PokerCardParserUtils.parseHoleCardsV2(holeCards);
|
|
|
|
|
|
|
|
List<String> tags = new ArrayList<>();
|
|
List<String> tags = new ArrayList<>();
|
|
|
if (seat == smallBlindSeat) {
|
|
if (seat == smallBlindSeat) {
|
|
@@ -66,7 +69,7 @@ public class ActionParserUtils {
|
|
|
bbPlayerName = name;
|
|
bbPlayerName = name;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- playerInfoMap.put(id, new PlayerInfo(name, seat, tags));
|
|
|
|
|
|
|
+ playerInfoMap.put(id, new PlayerInfo(name, seat, tags,holeCardsList));
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -93,7 +96,7 @@ public class ActionParserUtils {
|
|
|
|
|
|
|
|
PlayerInfo playerInfo = playerInfoMap.get(playerId);
|
|
PlayerInfo playerInfo = playerInfoMap.get(playerId);
|
|
|
if (playerInfo == null) {
|
|
if (playerInfo == null) {
|
|
|
- playerInfo = new PlayerInfo("未知玩家", seatNumber, Collections.emptyList());
|
|
|
|
|
|
|
+ playerInfo = new PlayerInfo("未知玩家", seatNumber, Collections.emptyList(), Collections.emptyList());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// 构建带标签的玩家名称
|
|
// 构建带标签的玩家名称
|
|
@@ -112,9 +115,13 @@ public class ActionParserUtils {
|
|
|
if (isBigBlindFreeAction && "CALL".equals(actionKey)) {
|
|
if (isBigBlindFreeAction && "CALL".equals(actionKey)) {
|
|
|
actionDetail = "跟注(大盲免费过牌)";
|
|
actionDetail = "跟注(大盲免费过牌)";
|
|
|
}
|
|
}
|
|
|
|
|
+ String holeCardsText = "";
|
|
|
|
|
+ if (!playerInfo.holeCards.isEmpty()) {
|
|
|
|
|
+ holeCardsText = ",底牌:" + String.join(",", playerInfo.holeCards);
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- String desc = String.format("[%s] 玩家 %s(座位%d)%s,加注金额为 %d",
|
|
|
|
|
- stage, playerNameWithTags, seatNumber, actionDetail, addAmount);
|
|
|
|
|
|
|
+ String desc = String.format("[%s] 玩家 %s(座位%d%s)%s,加注金额为 %d",
|
|
|
|
|
+ stage, playerNameWithTags, seatNumber, holeCardsText, actionDetail, addAmount);
|
|
|
|
|
|
|
|
chineseActions.add(desc);
|
|
chineseActions.add(desc);
|
|
|
}
|
|
}
|
|
@@ -186,11 +193,13 @@ public class ActionParserUtils {
|
|
|
String name;
|
|
String name;
|
|
|
int seat;
|
|
int seat;
|
|
|
List<String> tags;
|
|
List<String> tags;
|
|
|
|
|
+ List<String> holeCards; // 新增:解析后的底牌列表
|
|
|
|
|
|
|
|
- public PlayerInfo(String name, int seat, List<String> tags) {
|
|
|
|
|
|
|
+ public PlayerInfo(String name, int seat, List<String> tags, List<String> holeCards) {
|
|
|
this.name = name;
|
|
this.name = name;
|
|
|
this.seat = seat;
|
|
this.seat = seat;
|
|
|
this.tags = new ArrayList<>(tags);
|
|
this.tags = new ArrayList<>(tags);
|
|
|
|
|
+ this.holeCards = holeCards != null ? new ArrayList<>(holeCards) : new ArrayList<>();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|