コード例 #1
0
        private void Updating_Combo_Box(object sender, myEventArgs e)
        {
            UserControl1 tmp = (UserControl1)sender;

            pens = int.Parse(e.myString);
            for (int i = 0; i < uc.Length; i++)
            {
                if (tmp == uc[i])
                {
                    addpensIDX = i;
                }
            }

            uc[addpensIDX].AddPens(pens, BlueorRed);
            myICommon.HumanMove(addpensIDX, pens);
            int[] a;
            BlueorRed = 1 - BlueorRed;
            if (myICommon.Check())
            {
                isGameOver();
                return;
            }
            a = myICommon.computerLogic();
            uc[a[0]].AddPens(a[1], BlueorRed);
            BlueorRed = 1 - BlueorRed;
            if (myICommon.Check())
            {
                isGameOver();
            }
        }