Пример #1
0
 public FightRoom(int roomId, List <ClientPeer> clientList)
 {
     this.roomId = roomId;
     playerList  = new List <PlayerDto>();
     foreach (var client in clientList)
     {
         PlayerDto dto = new PlayerDto(client.Id, client.UserName);
         playerList.Add(dto);
     }
     cardLibrary          = new CardLibrary();
     roundModel           = new RoundModel();
     leaveUserIdList      = new List <int>();
     giveUpCardUserIdList = new List <int>();
     stakesSum            = 0;
 }
Пример #2
0
 /// <summary>
 /// 构造方法 做初始化
 /// </summary>
 /// <param name="id"></param>
 public FightRoom(int id, List <int> uidList)
 {
     this.Id         = id;
     this.PlayerList = new List <PlayerDto>();
     foreach (int uid in uidList)
     {
         PlayerDto player = new PlayerDto(uid);
         this.PlayerList.Add(player);
     }
     this.LeaveUIdList  = new List <int>();
     this.libraryModel  = new LibraryModel();
     this.TableCardList = new List <CardDto>();
     this.Multiple      = 1;
     this.roundModel    = new RoundModel();
 }
Пример #3
0
        /// <summary>
        /// 构造方法 做初始化
        /// </summary>
        /// <param name="id"></param>
        public FightRoom(int id, List <int> uIdList)
        {
            cardModel = new CardModel();

            this.id         = id;
            this.PlayerList = new List <PlayerDto>();

            foreach (int uid in uIdList)
            {
                PlayerDto dto = new PlayerDto(uid);
                PlayerList.Add(dto);
            }

            this.LeaveUidList  = new List <int>();
            this.TableCardList = new List <CardDto>();
            this.Mutiple       = 1;
            this.roundModel    = new RoundModel();
        }