コード例 #1
0
ファイル: Form1.cs プロジェクト: sleemjm1/IN710-sleemjm1
 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();
     }
 }
コード例 #2
0
ファイル: Form1.cs プロジェクト: gregfield/IN710-fielgm2
        // 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);
              }
        }
コード例 #3
0
ファイル: Form1.cs プロジェクト: gregfield/IN710-fielgm2
        // 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);
            }
        }
コード例 #4
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]);
            }
        }
コード例 #5
0
ファイル: Form1.cs プロジェクト: sleemjm1/IN710-sleemjm1
        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();
            }
        }
コード例 #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]);
            }
        }