|
@@ -137,7 +137,7 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
// 定庄
|
|
|
this.data.zhuangPos = 0;
|
|
|
// 设置当前操作玩家
|
|
|
-
|
|
|
+ this.data.currentPlayer = this.data.playerMap.get(this.data.zhuangPos);
|
|
|
// 发牌
|
|
|
this.doSendCard();
|
|
|
// 广播
|
|
@@ -183,12 +183,25 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
return;
|
|
|
}
|
|
|
if (CardUtils.contains(player.data.remainCards, disCardList)) {
|
|
|
+ logger.info("*****出牌玩家ID:{}, 位置:{}, 手牌大小:{}, 内容: {}", player.getId(), player.data.pos, player.data.remainCards.length, Arrays.toString(player.data.remainCards));
|
|
|
// 从手牌中移除
|
|
|
for (Integer card : disCardList) {
|
|
|
player.data.remainCards = CardUtils.remove(player.data.remainCards, card);
|
|
|
}
|
|
|
// 设置出牌堆
|
|
|
this.data.curDisCardList = disCardList;
|
|
|
+ // 设置当前出牌的玩家
|
|
|
+ this.data.disCardPlayer = player;
|
|
|
+ // 设置下一个操作玩家
|
|
|
+ Integer[] nextPos = this._getSorcPos(player.data.pos);
|
|
|
+ this.data.currentPlayer = this.data.playerMap.get(nextPos[0]);
|
|
|
+ // 广播其他3人
|
|
|
+ for (Player tmPlayer : this.data.playerMap.values()) {
|
|
|
+ if (tmPlayer != null && !Objects.equals(tmPlayer.getId(), player.getId())) {
|
|
|
+ Map<String, Object> data = MsgUtil.roomToMessage(this, tmPlayer, null);
|
|
|
+ tmPlayer.receive(CommonProto.Cmd.OtherPlayCards_VALUE, data);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|