コード例 #1
0
 private void button12_Click(object sender, EventArgs e)
 {
     if (btns[1, 2].Text == "")
     {
         btns[1, 2].Text    = "X";
         ChoiceTree.A[1, 2] = 1;
         ChoiceTree.PlayerMove();
     }
 }
コード例 #2
0
        public static void PlayerMove()
        {
            switch (ChoiceTree.count)
            {
            case 0:
            {
                ChoiceTree.firstMove();
                break;
            }

            case 1:
            {
                ChoiceTree.secondMove1();
                break;
            }

            case 2:
            {
                ChoiceTree.secondMove2();
                break;
            }

            case 3:
            {
                ChoiceTree.secondMove3();
                break;
            }

            case 4:
            {
                ChoiceTree.secondMove4();
                break;
            }

            case 5:
            {
                ChoiceTree.thirdMove1();
                break;
            }

            case 7:
            {
                ChoiceTree.thirdMove3();
                break;
            }

            default:
            {
                ChoiceTree.fourthMove();
                break;
            }
            }
        }
コード例 #3
0
 public Form1()
 {
     InitializeComponent();
     btns[0, 0] = button00;
     btns[0, 1] = button01;
     btns[0, 2] = button02;
     btns[1, 0] = button10;
     btns[1, 1] = button11;
     btns[1, 2] = button12;
     btns[2, 0] = button20;
     btns[2, 1] = button21;
     btns[2, 2] = button22;
     ChoiceTree tut = new ChoiceTree();
 }