private void DealCard() { _deck.Deal(1); foreach (string cardName in _deck.GetCardNames()) { lblCard.Text = cardName; } lblDeck.Text = _deck.Count.ToString(); }
private void StartGame() { List <Card> startCards = new List <Card>(); startCards = _deck.Deal(2); Card[] cards = new Card[2]; for (int i = 0; i < startCards.Count; i++) { cards[i] = startCards[i]; } _upCards.Add(cards[1]); holeCard = new Card(cards[0].rank, cards[0].suit); lblHoleCard.Text = cards[0].ToString(); lblHoleCard.Visible = false; btnStart.Enabled = false; btnHitMe.Enabled = true; }
public void DealCards() { DeckOfCards deck = new DeckOfCards(); Assert.AreEqual(52, deck.Count); deck.Deal(5); Assert.AreEqual(5, deck.Count); deck.ResetDeck(); Assert.AreEqual(52, deck.Count); }
private void btnDeal_Click(object sender, EventArgs e) { _cards = _deck.Deal(5); ShowHand(); }