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)); } } }
void flower() { for (int i = 0; i < r.getCount(); i++) { if (all.State == l.Position) { if (r.getBrand(i).getClass() == Mahjong.Properties.Settings.Default.Flower && r.getBrand(i).getNumber() == 1) { textBox1.Text += "梅\r\n"; tally += 1; } if (r.getBrand(i).getClass() == Mahjong.Properties.Settings.Default.Flower && r.getBrand(i).getNumber() == 5) { textBox1.Text += "春\r\n"; tally += 1; } } l.nextPosition(); if (all.State == l.Position) { if (r.getBrand(i).getClass() == Mahjong.Properties.Settings.Default.Flower && r.getBrand(i).getNumber() == 2) { textBox1.Text += "蘭\r\n"; tally += 1; } if (r.getBrand(i).getClass() == Mahjong.Properties.Settings.Default.Flower && r.getBrand(i).getNumber() == 6) { textBox1.Text += "夏\r\n"; tally += 1; } } l.nextPosition(); if (all.State == l.Position) { if (r.getBrand(i).getClass() == Mahjong.Properties.Settings.Default.Flower && r.getBrand(i).getNumber() == 3) { textBox1.Text += "菊\r\n"; tally += 1; } if (r.getBrand(i).getClass() == Mahjong.Properties.Settings.Default.Flower && r.getBrand(i).getNumber() == 7) { textBox1.Text += "秋\r\n"; tally += 1; } } l.nextPosition(); if (all.State == l.Position) { if (r.getBrand(i).getClass() == Mahjong.Properties.Settings.Default.Flower && r.getBrand(i).getNumber() == 4) { textBox1.Text += "竹\r\n"; tally += 1; } if (r.getBrand(i).getClass() == Mahjong.Properties.Settings.Default.Flower && r.getBrand(i).getNumber() == 8) { textBox1.Text += "冬\r\n"; tally += 1; } } l.nextPosition(); } }
void ponpon() { int i = 0, count = 0; while (i < y.getCount() - 2) { if (y.getBrand(i).getClass() == y.getBrand(i + 1).getClass() && y.getBrand(i).getNumber() == y.getBrand(i + 1).getNumber() && y.getBrand(i).getClass() == y.getBrand(i + 2).getClass() && y.getBrand(i).getNumber() == y.getBrand(i + 2).getNumber()) { if (/*i < y.getCount()-3 &&*/ y.getBrand(i + 3).getClass() == y.getBrand(i).getClass() && y.getBrand(i + 3).getNumber() == y.getBrand(i).getNumber()) { i++; } count++; } if (count == 5 && y.getBrand(i).getClass() == y.getBrand(i + 1).getClass() && y.getBrand(i).getNumber() == y.getBrand(i + 1).getNumber()) { textBox1.Text += "碰碰胡\r\n"; tally += 4; break; } i++; } }