|
@@ -16,12 +16,12 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
|
|
|
/**
|
|
|
* 掼蛋对应的数值
|
|
|
- * 0x03-0x0f 方片(♦️)3-2
|
|
|
- * 0x11-0x19 梅花(♣️)3-2
|
|
|
- * 0x21-0x29 红桃(♥️)3-2
|
|
|
- * 0x31-0x37 黑桃(♠️)3-2
|
|
|
- * 0xef 小王
|
|
|
- * 0xff 大王
|
|
|
+ * 0x03-0x0f 方片(♦️)3(3) 4(4) 5(5) 6(6) 7(7) 8(8) 9(9) 10(10) J(11) Q(12) K(13) A(14) 2(15)
|
|
|
+ * 0x13-0x1f 梅花(♣️)3(19) 4(20) 5(21) 6(22) 7(23) 8(24) 9(25) 10(26) J(27) Q(28) K(29) A(30) 2(31)
|
|
|
+ * 0x23-0x2f 红桃(♥️)3(35) 4(36) 5(37) 6(38) 7(39) 8(40) 9(41) 10(42) J(43) Q(44) K(45) A(46) 2(47)
|
|
|
+ * 0x33-0x3f 黑桃(♠️)3(51) 4(52) 5(53) 6(54) 7(55) 8(56) 9(57) 10(58) J(59) Q(60) K(61) A(62) 2(63)
|
|
|
+ * 0xef 小王(239)
|
|
|
+ * 0xff 大王(255)
|
|
|
*/
|
|
|
public static Integer[] values = {
|
|
|
0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
|
|
@@ -143,9 +143,10 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
// 广播
|
|
|
for (Player tmPlayer : this.data.playerMap.values()) {
|
|
|
if (tmPlayer != null) {
|
|
|
- Map<String, Object> data = MsgUtil.roomToMessage(this, tmPlayer, null);
|
|
|
+ Map<String, Object> data = MsgUtil.roomToMessage(this, tmPlayer, this.data.currentPlayer);
|
|
|
data.put("state", 2);
|
|
|
data.put("time", 20);
|
|
|
+ CardUtils.printCards(tmPlayer.data.remainCards);
|
|
|
tmPlayer.receive(CommonProto.Cmd.GameStateChange_VALUE, data);
|
|
|
}
|
|
|
}
|
|
@@ -177,7 +178,7 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
* @param player
|
|
|
* @param disCardList
|
|
|
*/
|
|
|
- public void playerDisCard(Player player, List<Integer> disCardList) {
|
|
|
+ public void playerDisCard(Player player, int[] disCardList) {
|
|
|
// 是否自己回合
|
|
|
if (!this.data.currentPlayer.getId().equals(player.getId())) {
|
|
|
return;
|
|
@@ -203,7 +204,7 @@ public class JDGDRoom extends Room implements GRoomInterface {
|
|
|
// 广播其他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);
|
|
|
+ Map<String, Object> data = MsgUtil.roomToMessage(this, tmPlayer, this.data.currentPlayer);
|
|
|
tmPlayer.receive(CommonProto.Cmd.OtherPlayCards_VALUE, data);
|
|
|
}
|
|
|
}
|