コード例 #1
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 += "白板\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;
            //}
        }
コード例 #2
0
        void nouth()
        {
            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() == 4 && y.getBrand(i + 1).getClass() == w.getClass() && y.getBrand(i + 1).getNumber() == 4 && y.getBrand(i + 2).getClass() == w.getClass() && y.getBrand(i + 2).getNumber() == 4)
                {
                    if (i < y.getCount() - 3 && y.getBrand(i + 3).getClass() == w.getClass() && y.getBrand(i + 3).getNumber() == 4)
                    {
                        i += 3;
                    }
                    temp += 1;
                    if (all.State == location.North)
                    {
                        textBox1.Text += "北風位\r\n";
                        tally         += 1;
                    }
                    if (l.Round == location.North)
                    {
                        textBox1.Text += "北風局\r\n";
                        tally         += 1;
                    }
                }
                else if (y.getBrand(i).getClass() == w.getClass() && y.getBrand(i).getNumber() == 4 && y.getBrand(i + 1).getClass() == w.getClass() && y.getBrand(i + 1).getNumber() == 4)
                {
                    index = true;
                }
            }
            //tally += 1;
        }
コード例 #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 += "青發\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;
            //}
        }