Exemple #1
0
        public static void GetHandResult(List <Card> inCardList)
        {
            IterationCount++;

            /*
             * List<Card> playerA_Cards = new List<Card>();
             * List<Card> playerB_Cards = new List<Card>();
             *
             * playerA_Cards.Add(in_CardList[0]);
             * playerA_Cards.Add(in_CardList[1]);
             *
             * playerA_Cards.Add(in_CardList[4]);
             * playerA_Cards.Add(in_CardList[5]);
             * playerA_Cards.Add(in_CardList[6]);
             * playerA_Cards.Add(in_CardList[7]);
             * playerA_Cards.Add(in_CardList[8]);
             *
             * playerB_Cards.Add(in_CardList[2]);
             * playerB_Cards.Add(in_CardList[3]);
             *
             * playerB_Cards.Add(in_CardList[4]);
             * playerB_Cards.Add(in_CardList[5]);
             * playerB_Cards.Add(in_CardList[6]);
             * playerB_Cards.Add(in_CardList[7]);
             * playerB_Cards.Add(in_CardList[8]);
             *
             * CompareCards(playerA_Cards, playerB_Cards);
             */

            CardStatistics.RecordPlayerACard(inCardList);
            bool bNeedPrint = false;

            if (bNeedPrint)
            {
                foreach (var item in inCardList)
                {
                    Console.Write(" " + item.Print());
                }
                Console.Write("\n\n");
            }
        }
Exemple #2
0
        public static void CalcBeginWinRate()
        {
            List <List <Card> > AllHandCard = new List <List <Card> >();
            List <Card>         poolList    = new List <Card>();// GetAllCardList();
            List <Card>         hands       = new List <Card>();

            //Card cSA = poolList.Find(p => p.iColor == Color.Spade && p.iNumber == 1);
            //Card cHA = poolList.Find(p => p.iColor == Color.Heart && p.iNumber == 1);
            //poolList.Remove(cSA);
            //poolList.Remove(cHA);
            //hands.Add(cSA);
            //hands.Add(cHA);

            //Card cCA = poolList.Find(p => p.iColor == Color.Club && p.iNumber == 1);
            //Card cDA = poolList.Find(p => p.iColor == Color.Diamond && p.iNumber == 1);
            //poolList.Remove(cCA);
            //poolList.Remove(cDA);

            Combination(poolList, 2, hands);
            CardStatistics.WriteHandCardList();
            //Permutation(poolList, 9);
            Console.WriteLine("CalcBeginWinRate IterationCount = " + IterationCount);
        }
Exemple #3
0
 public static void Test()
 {
     //CalcBeginWinRate();
     CardStatistics.CalcAllHandCardAgainstResult();
 }