public Poker() { InitializeComponent(); _deck = new DeckOfCards(); _cards = new List<Card>(); }
protected virtual void StartGame() { Deck = new DeckOfCards(); Deck.Shuffle(); lblDeck.Text = Deck.Count.ToString(); btnDeal.Enabled = true; btnStart.Enabled = false; }
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); }
public GuessTheCard() { InitializeComponent(); _deckToPick = new DeckOfCards(); }
private void StartGame() { _deck = new DeckOfCards(); _deck.Shuffle(); lblDeck.Text = _deck.Count.ToString(); lblCard.Visible = false; lblGuesses.Text = "0"; lblCardName.Visible = true; lblHints.Text = ""; cbPickDeck.Items.Clear(); }
// This button method will reset the Deck to its original full 52 cards private void button5_Click(object sender, EventArgs e) { Deck = new DeckOfCards(); textBox3.Text = Deck.numCards.ToString(); textBox2.Text = ""; }
private void LoadGame() { _deck = new DeckOfCards(); _upCards = new List<Card>(); _blackjack = new BlackJack(_upCards); _deck.Shuffle(); lblDeck.Text = _deck.Count.ToString(); lbUpCards.Items.Clear(); lblSum.Text = "0"; lblHoleCard.Text = "???"; btnStart.Enabled = true; btnHitMe.Enabled = false; }