/// <summary>
        /// 设置地主身份并且给地主发底牌
        /// </summary>
        /// <param name="uid"></param>
        public void SetLandlord(int uid)
        {
            PlayerDto player = this.PlayerDtos.Find(a => a.Uid == uid);

            player.Identity = Identity.LANDLORD;
            for (int i = 0; i < 3; i++)
            {
                player.AddCard(TableCardList[i]);
            }
            //开始回合
            this.RoundModel.Start(uid);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 给发玩家发指定类型的卡牌
        /// </summary>
        /// <param name="uid"></param>
        /// <param name="CardType"></param>
        /// <returns></returns>
        public List <CardDto> DispathCard(int uid, int cardType)
        {
            PlayerDto      player   = GetPlayerDto(uid);
            List <CardDto> cardList = new List <CardDto>();

            for (int i = 0; i < 1; i++)
            {
                CardDto cardDto = cardLibrary.DispatchCard(uid, cardType);

                if (cardDto == null)
                {
                    break;
                }
                player.AddCard(cardDto);
                cardList.Add(cardDto);
            }
            return(cardList);
        }