Beispiel #1
0
            public List <int> TotalValue()
            {
                BinaryTree valuetree = new BinaryTree(0);

                foreach (Card card in hand)
                {
                    if (card.number == 0)
                    {
                        valuetree.AddAce();
                    }
                    else
                    {
                        if (card.number >= 10)
                        {
                            valuetree.AddAll(10);
                        }
                        else
                        {
                            valuetree.AddAll(card.number + 1);
                        }
                    }
                }
                return(valuetree.GetAllValues());
            }