Esempio n. 1
0
 private void TryToPlayCard(Card clickedCard)
 {
     // This MessageBox is for debugging purposes only.
     //MessageBox.Show(clickedCard.ToString(false, true), "Clicked");
     UpdatePictureBoxImageRight(rightPictureBox, Crazy_Eight_Game.Check(clickedCard));
     if (clickedCard.GetFaceValue() == FaceValue.Eight)
     {
         Form Crazy_Eight = new WhatSuit();
         Crazy_Eight.Show();
     }
     DisplayGuiHand(Crazy_Eight_Game.GetHand(0), bottomTableLayoutPanel, 0);
 }
Esempio n. 2
0
 private void dealButton_Click(object sender, EventArgs e)
 {
     for (int i = 0; i < 8; i++)
     {
         Crazy_Eight_Game.DealOneCardTo(1);
         Crazy_Eight_Game.DealOneCardTo(0);
     }
     DisplayGuiHand(Crazy_Eight_Game.GetHand(1), topTableLayoutPanel, 1);
     DisplayGuiHand(Crazy_Eight_Game.GetHand(0), bottomTableLayoutPanel, 0);
     UpdatePictureBoxImageRight(rightPictureBox, Crazy_Eight_Game.DealOneCardToMiddle());
     leftPictureBox.Enabled = true;
     dealButton.Enabled     = false;
     sortButton.Enabled     = true;
     instructionLabel.Text  = "Your turn. Click on one your cards to play.";
 }
Esempio n. 3
0
 private void button1_Click(object sender, EventArgs e)
 {
     if (radioButton1.Checked)
     {
         Crazy_Eight_Game.GetHand(2).GetCard(0).GetSuit();
     }
     else if (radioButton2.Checked)
     {
         //Suit.Diamonds;
     }
     else if (radioButton3.Checked)
     {
         //Suit.Hearts;
     }
     else if (radioButton4.Checked)
     {
         //Suit.Spades;
     }
     this.Close();
 }
Esempio n. 4
0
 private void leftPictureBox_Click(object sender, EventArgs e)
 {
     Crazy_Eight_Game.Add();
     DisplayGuiHand(Crazy_Eight_Game.GetHand(0), bottomTableLayoutPanel, 0);
 }
Esempio n. 5
0
 private void sortButton_Click(object sender, EventArgs e)
 {
     Crazy_Eight_Game.Sort();
     DisplayGuiHand(Crazy_Eight_Game.GetHand(0), bottomTableLayoutPanel, 0);
 }