Example #1
0
 private void button1_Click(object sender, EventArgs e)
 {
     listBox1.Items.Clear();
     THand[] Hands = new THand[4];
     for (int i = 0; i < Hands.Length; i++) Hands[i] = new THand(listBox1);
     TDeck myDeck = new TDeck();
     myDeck.shuffle();
     myDeck.Deal(Hands);
     for (int i = 0; i < Hands.Length; i++)
     {
         Hands[i].SortHand();
         Hands[i].DispayHand();
     }
 }
Example #2
0
        // creates the deck and deals out the 4 hands from the deck.
        private void button1_Click(object sender, EventArgs e)
        {
            TDeck myDeck = new TDeck();         // create and initialise a new TDeck
              THand[] myHand = new THand[HANDS];  // create and initialse a THand array
              listBox1.Items.Clear();             // clear the listBox
              myDeck.Shuffle();                   // shuffle the deckArray

              // create the 4 handArrays, sort the handArrays and display them
              for (int i = 0; i < HANDS; i++)
              {
            myHand[i] = myDeck.dealHand(i);
            myHand[i].sortHand();
            myHand[i].printHand(listBox1);
              }
        }
Example #3
0
        // creates the deck and deals out the 4 hands from the deck.
        private void button1_Click(object sender, EventArgs e)
        {
            TDeck myDeck = new TDeck();        // create and initialise a new TDeck

            THand[] myHand = new THand[HANDS]; // create and initialse a THand array
            listBox1.Items.Clear();            // clear the listBox
            myDeck.Shuffle();                  // shuffle the deckArray

            // create the 4 handArrays, sort the handArrays and display them
            for (int i = 0; i < HANDS; i++)
            {
                myHand[i] = myDeck.dealHand(i);
                myHand[i].sortHand();
                myHand[i].printHand(listBox1);
            }
        }
        private void button1_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            THand[] Hands = new THand[4];
            String[] names = { "North:", "South:", "East:", "West:" };
            for (int i = 0; i < Hands.Length; i++) Hands[i] = new THand(listBox1);
            TDeck myDeck = new TDeck();
            myDeck.shuffle();
            myDeck.Deal(Hands);
            for (int i = 0; i < Hands.Length; i++)
            {

                Hands[i].SortHand();
                //parses in name to display hand
                Hands[i].DispayHand(names[i]);
            }
        }
Example #5
0
        private void button1_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            THand[] Hands = new THand[4];
            for (int i = 0; i < Hands.Length; i++)
            {
                Hands[i] = new THand(listBox1);
            }
            TDeck myDeck = new TDeck();

            myDeck.shuffle();
            myDeck.Deal(Hands);
            for (int i = 0; i < Hands.Length; i++)
            {
                Hands[i].SortHand();
                Hands[i].DispayHand();
            }
        }
Example #6
0
        private void button1_Click(object sender, EventArgs e)
        {
            listBox1.Items.Clear();
            THand[]  Hands = new THand[4];
            String[] names = { "North:", "South:", "East:", "West:" };
            for (int i = 0; i < Hands.Length; i++)
            {
                Hands[i] = new THand(listBox1);
            }
            TDeck myDeck = new TDeck();

            myDeck.shuffle();
            myDeck.Deal(Hands);
            for (int i = 0; i < Hands.Length; i++)
            {
                Hands[i].SortHand();
                //parses in name to display hand
                Hands[i].DispayHand(names[i]);
            }
        }