Esempio n. 1
0
 void four()
 {
     if (x.getCount() > 17)
     {
         for (int i = 0; i < x.getCount() - 3; i++)
         {
             if (x.getBrand(i).getClass() == x.getBrand(i + 1).getClass() && x.getBrand(i + 2).getClass() == x.getBrand(i).getClass() && x.getBrand(i + 3).getClass() == x.getBrand(i).getClass() && x.getBrand(i).getNumber() == x.getBrand(i + 1).getNumber() && x.getBrand(i + 2).getNumber() == x.getBrand(i).getNumber() && x.getBrand(i + 3).getNumber() == x.getBrand(i).getNumber())
             {
                 for (int j = 0; j < 4; j++)
                 {
                     z.add(x.getBrand(i));
                     x.remove(x.getBrand(i));
                 }
                 i -= 1;
             }
         }
     }
 }
Esempio n. 2
0
 void removeflower()
 {
     for (int i = 0; i < x.getCount(); i++)
     {
         if (x.getBrand(i).getClass() != "花")
         {
             y.add(x.getBrand(i));
         }
         else
         {
             r.add(x.getBrand(i));
         }
     }
 }