Пример #1
0
        //玩家出牌
        public static void PlayCard(this JoyLdsRoom joyLdsRoom, int seatIndex, RepeatedField <int> cards)
        {
            int playCardType = 0;

            if (joyLdsRoom.CurrPlayCardType == PlayCardType.None)
            {
                playCardType = JoyLdsGamePlayHandLogic.PlayerPlayHandIsRational(cards);
            }
            else if (joyLdsRoom.CurrBeOperationSeatIndex == seatIndex)
            {
                playCardType = JoyLdsGamePlayHandLogic.PlayerPlayHandIsRational(joyLdsRoom.CurrPlayCardType, joyLdsRoom.CurrPlayCardCards, cards);
            }
            if (playCardType != PlayCardType.None)
            {
                joyLdsRoom.AttirmPlayCard(seatIndex, playCardType, cards);
            }
            else
            {
                Log.Info("玩家索引:" + seatIndex + "  出牌不合理");
            }
        }