Exemple #1
0
        public void setO(int index)
        {
            but[index - 1].Text = "o";

            present_step = TYPE_STEP.X;

            if (step != null)
            {
                step(getVectorX(), index, "o");
            }
        }
Exemple #2
0
        public int setRandom(TYPE_STEP type)
        {
            Random  random = new Random();
            int     index  = 0;
            Boolean rect   = false;

            do
            {
                index = random.Next(1, 10);
                rect  = CheckRect(index);
            } while (!rect);

            if (type == TYPE_STEP.X)
            {
                setX(index);
            }
            else if (type == TYPE_STEP.O)
            {
                setO(index);
            }

            return(index);
        }