Exemple #1
0
        public static int CalcAllHandCardAgainstResult()
        {
            List <List <Card> > allHandCardList = GetPruningHandCardList();
            int iCount = 0;

            foreach (var handCard in allHandCardList)
            {
                SortedList <int, AgainstResult> againstResultList = new SortedList <int, AgainstResult>();

                int iHandCardId = CardList.GetHandId(handCard);
                Debug.Assert(!AllAgainstResultList.ContainsKey(iHandCardId));
                AllAgainstResultList.Add(iHandCardId, againstResultList);

                CombinePreList(handCard, 2, (_CardList) =>
                {
                    Debug.Assert(_CardList != null);
                    Debug.Assert(_CardList.Count == 4);
                    List <Card> oppoCard = new List <Card>();
                    oppoCard.Add(_CardList[2]);
                    oppoCard.Add(_CardList[3]);

                    int iOppoCardId = CardList.GetOppoId(handCard, oppoCard);
                    //check is exist in againstResultList
                    if (againstResultList.ContainsKey(iOppoCardId))
                    {
                        return;
                    }
                    AgainstResult againstResult = CalcAgainstResult(handCard, oppoCard);
                    againstResultList.Add(iOppoCardId, againstResult);
                    iCount++;
                });
            }

            Utility.Log("CalcAllHandCardAgainstResult iCount = " + iCount);

            return(0);
        }
Exemple #2
0
        public static AgainstResult CalcAgainstResult(List <Card> _HandCardList, List <Card> _OppoCardList)
        {
            AgainstResult againstResult = new AgainstResult();

            return(againstResult);
        }