getClass() public method

�P�����O
public getClass ( ) : string
return string
Beispiel #1
0
 void west()
 {
     WordBrand w = new WordBrand(0);
     for (int i = 0; i < y.getCount() - 2; i++)
         if (y.getBrand(i).getClass() == w.getClass() && y.getBrand(i).getNumber() == 3 && y.getBrand(i + 1).getClass() == w.getClass() && y.getBrand(i + 1).getNumber() == 3 && y.getBrand(i + 2).getClass() == w.getClass() && y.getBrand(i + 2).getNumber() == 3)
         {
             if (i < y.getCount() - 3 && y.getBrand(i + 3).getClass() == w.getClass() && y.getBrand(i + 3).getNumber() == 3)
                 i+=3;
             temp += 1;
             if (all.State == location.West)
             {
                 textBox1.Text += "�護��\r\n";
                 tally += 1;
             }
             if (l.Round == location.West)
             {
                 textBox1.Text += "�護��\r\n";
                 tally += 1;
             }
         }
         else if (y.getBrand(i).getClass() == w.getClass() && y.getBrand(i).getNumber() == 3 && y.getBrand(i + 1).getClass() == w.getClass() && y.getBrand(i + 1).getNumber() == 3)
         {
             index = true;
         }
     //tally += 1;
 }
Beispiel #2
0
        void white()
        {
            WordBrand w = new WordBrand(0);
            for (int i = 0; i < y.getCount() - 2; i++)
                if (y.getBrand(i).getClass() == w.getClass() && y.getBrand(i).getNumber() == 5 && y.getBrand(i + 1).getClass() == w.getClass() && y.getBrand(i + 1).getNumber() == 5 && y.getBrand(i + 2).getClass() == w.getClass() && y.getBrand(i + 2).getNumber() == 5)
                //if (brands[i].getClass() == w.getClass() && brands[i].getNumber() == 5 && brands[i + 1].getClass() == w.getClass() && brands[i + 1].getNumber() == 5 && brands[i + 2].getClass() == w.getClass() && brands[i + 2].getNumber() == 5)
                {
                    if (i < y.getCount() - 3 && y.getBrand(i + 3).getClass() == w.getClass() && y.getBrand(i + 3).getNumber() == 5)
                        i+=3;

                    //i += 2;
                    tally += 1;
                    temp += 1;
                    textBox1.Text += "�ժO\r\n";
                }
                else if (y.getBrand(i).getClass() == w.getClass() && y.getBrand(i).getNumber() == 5 && y.getBrand(i + 1).getClass() == w.getClass() && y.getBrand(i + 1).getNumber() == 5)
                {
                    index = true;
                }
            //if (temp == 1)
              //  tally += 1;
            //else if (brands[i+1].getClass() == w.getClass() && brands[i+1].getNumber() == 5 && brands[i + 2].getClass() == w.getClass() && brands[i + 2].getNumber() == 5)
            //{
            //    temp += 2;
            //}
        }
Beispiel #3
0
        void green()
        {
            WordBrand w = new WordBrand(0);
            for (int i = 0; i < y.getCount() - 2; i++)

                //if (brands[i].getClass() == w.getClass() && brands[i].getNumber() == 6 && brands[i + 1].getClass() == w.getClass() && brands[i + 1].getNumber() == 6 && brands[i + 2].getClass() == w.getClass() && brands[i + 2].getNumber() == 6)
                if (y.getBrand(i).getClass() == w.getClass() && y.getBrand(i).getNumber() == 6 && y.getBrand(i + 1).getClass() == w.getClass() && y.getBrand(i + 1).getNumber() == 6 && y.getBrand(i + 2).getClass() == w.getClass() && y.getBrand(i + 2).getNumber() == 6)
                {
                    if (i < y.getCount()-3 && y.getBrand(i + 3).getClass() == w.getClass() && y.getBrand(i + 3).getNumber() == 6)
                        i+=3;
                    //i += 2;
                    tally += 1;
                    temp += 1;
                    textBox1.Text += "�C�o\r\n";
                }
                else if (y.getBrand(i).getClass() == w.getClass() && y.getBrand(i).getNumber() == 6 && y.getBrand(i + 1).getClass() == w.getClass() && y.getBrand(i + 1).getNumber() == 6)
                {
                    index = true;
                }
            //textBox1.Text += temp.ToString();
               // if (temp == 2)
             //   tally += 1;
            //else if (brands[i+1].getClass() == w.getClass() && brands[i+1].getNumber() == 6 && brands[i + 2].getClass() == w.getClass() && brands[i + 2].getNumber() == 6)
            //{
            //    temp += 2;
            //}
        }