Ejemplo n.º 1
0
        private SelectCards BuildSelectCardsModel(IEnumerable <Card> cards, UserModel userModel, int amountOfCards, int page)
        {
            var resultCards = new SelectCards
            {
                Cards = cards
                        .OrderBy(x => x.ManaCost)
                        .ThenBy(x => x.Name),

                PageInfo = new PageInfo
                {
                    CurrentPage  = page,
                    ItemsPerPage = _pageSize,
                    TotalItems   = amountOfCards
                },

                UserModel = userModel
            };

            return(resultCards);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 发送手牌选择(开局首摸)
 /// </summary>
 public static void SendSeletFirstHandCards(SelectCards selectCards)
 {
     byte[] byt = Incode.IncodeSecondaryCommand(TYPE, (int)SecondCommands.DEAL, DataDo.Object2Json(selectCards));
     NetStart.SendContend(byt);
 }