Example #1
0
        /// <summary>
        /// Начало 1 игры сплита
        /// </summary>
        public void SplitGame1Start()
        {
            _deck.Shuffle(CardCount); //перемешиваем колоду и берем из нее 11 карт

            //добавляем карты из основной игры в сплит-колоды
            PlayerCardsList_Split1.Add(PlayerFirstCard);

            // Берем карту из главной игры
            totalplayer += PlayerFirstCard.GetValue();
            PlayerCards += PlayerFirstCard.GetCaption() + " ";


            PlayerAddCard(PlayerCardsList_Split1);

            if (GetTotalDealer() == 22)
            {
                totaldealer = 2;
            }
        }
        void ReleaseDesignerOutlets()
        {
            if (ButtonStick != null)
            {
                ButtonStick.Dispose();
                ButtonStick = null;
            }

            if (ButtonHit != null)
            {
                ButtonHit.Dispose();
                ButtonHit = null;
            }

            if (LabelPlayerScore != null)
            {
                LabelPlayerScore.Dispose();
                LabelPlayerScore = null;
            }

            if (LabelDealerScore != null)
            {
                LabelDealerScore.Dispose();
                LabelDealerScore = null;
            }

            if (LabelDealersHandTotal != null)
            {
                LabelDealersHandTotal.Dispose();
                LabelDealersHandTotal = null;
            }

            if (LabelPlayersHandTotal != null)
            {
                LabelPlayersHandTotal.Dispose();
                LabelPlayersHandTotal = null;
            }

            if (LabelConvoText != null)
            {
                LabelConvoText.Dispose();
                LabelConvoText = null;
            }

            if (DealerFirstCard != null)
            {
                DealerFirstCard.Dispose();
                DealerFirstCard = null;
            }

            if (DealerSecondCard != null)
            {
                DealerSecondCard.Dispose();
                DealerSecondCard = null;
            }

            if (DealerThirdCard != null)
            {
                DealerThirdCard.Dispose();
                DealerThirdCard = null;
            }

            if (DealerFourthCard != null)
            {
                DealerFourthCard.Dispose();
                DealerFourthCard = null;
            }

            if (DealerFifthCard != null)
            {
                DealerFifthCard.Dispose();
                DealerFifthCard = null;
            }

            if (PlayerFirstCard != null)
            {
                PlayerFirstCard.Dispose();
                PlayerFirstCard = null;
            }

            if (PlayerSecondCard != null)
            {
                PlayerSecondCard.Dispose();
                PlayerSecondCard = null;
            }

            if (PlayerThirdCard != null)
            {
                PlayerThirdCard.Dispose();
                PlayerThirdCard = null;
            }

            if (PlayerFourthCard != null)
            {
                PlayerFourthCard.Dispose();
                PlayerFourthCard = null;
            }

            if (PlayerFifthCard != null)
            {
                PlayerFifthCard.Dispose();
                PlayerFifthCard = null;
            }
        }