public void setO(int index) { but[index - 1].Text = "o"; present_step = TYPE_STEP.X; if (step != null) { step(getVectorX(), index, "o"); } }
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); }