示例#1
0
 public void AddCard(ref Deck A)
 {
     if (CountPoints() < 17)
     {
         _hand.AddCard(ref A);
     }
 }
示例#2
0
文件: Hand.cs 项目: adenvik/BlackJack
 public void AddCard(ref Deck A)
 {
     int number = 0, lear = 0;
     Bitmap bmp = new Bitmap(120,120);
     A.GetCard(ref number, ref lear, ref bmp);
     _cardsInHand.Add(new Card(number,lear,bmp));
 }
示例#3
0
        public void Game()
        {
            //cards = new List<Card>();
            _player = new Player();
            _dealer = new Dealer();

            int posX = 600;
            for (int i = 0; i < 4; i++)
            {
                decks[i] = new Deck(numberCards, posX);
                posX += 100;
            }
 
            int numberDeck = r.Next(0, 3);
            _player.AddCard(ref decks[numberDeck]);
            numberDeck = r.Next(0, 3);
            _player.AddCard(ref decks[numberDeck]);
            numberDeck = r.Next(0, 3);
            _dealer.AddCard(ref decks[numberDeck]);

            draw();
        }
示例#4
0
 public void AddCard(ref Deck A)
 {
     _hand.AddCard(ref A);
 }