Exemple #1
0
        //玩家摸牌
        public static void MoPai(this FiveStarPlayer fiveStarPlayer, int card)
        {
            card = fiveStarPlayer.AIMoPaiDispose(card); //AI摸牌处理
            fiveStarPlayer.MoEndHand = card;            //记录摸的最后一张手牌
            fiveStarPlayer.Hands.Add(card);
            //广播给客户端摸牌消息 但是只有摸的人 牌才是对的
            Actor_FiveStar_MoPai actorFiveStarMoPai = new Actor_FiveStar_MoPai();

            actorFiveStarMoPai.SeatIndex = fiveStarPlayer.SeatIndex;
            actorFiveStarMoPai.Card      = card;
            fiveStarPlayer.FiveStarRoom.RecordMoCard(actorFiveStarMoPai);//记录摸牌消息
            fiveStarPlayer.SendMessageUser(actorFiveStarMoPai);
            actorFiveStarMoPai.Card = -1;
            fiveStarPlayer.SendMessageOtherUser(actorFiveStarMoPai);

            fiveStarPlayer.Hands.Sort();//每次检测前要把手牌排序一下
            if (fiveStarPlayer.IsCanOperate())
            {
                fiveStarPlayer.CanOperate(FiveStarOperateType.ChuCard);
            }
            else
            {
                fiveStarPlayer.CanChuPai();
            }
        }
Exemple #2
0
        //广播玩家可以操作信息
        public static void CanOperate(this FiveStarPlayer fiveStarPlayer, int qiOprateNextStep)
        {
            Actor_FiveStar_CanOperate actorFiveStarCanOperate = new Actor_FiveStar_CanOperate();

            fiveStarPlayer.SendMessageOtherUser(actorFiveStarCanOperate);
            actorFiveStarCanOperate.SeatIndex      = fiveStarPlayer.SeatIndex;
            actorFiveStarCanOperate.CanOperateLits = fiveStarPlayer.canOperateLists;
            actorFiveStarCanOperate.CanGangLits.Add(fiveStarPlayer.canGangCards.Keys.ToArray());
            fiveStarPlayer.SendMessageUser(actorFiveStarCanOperate);
            fiveStarPlayer.FiveStarRoom.QiOperateNextStep = qiOprateNextStep;
            fiveStarPlayer.FiveStarRoom.PlayerCanOperate(actorFiveStarCanOperate);//告诉房间玩家可以操作
        }