private void Normal() { if (turnCount > 0) { if (TicTac.CheckAlmost(array, out x, out y) == true) { Draw(turn, x, y); array[x, y] = TicTac.SetValue(turn); NextTurn(); } else { RandomMove(); } } }
private void Impossible() { if (turnCount > 0) { if (TicTac.CheckAlmost(array, out x, out y) == true) { ButtonPress(x, y); } else { if (TicTac.CheckTrap(array, turnCount, out button) == true) { TicTac.ButtonToArray(button, out x, out y); ButtonPress(x, y); } else { if (array[1, 1] == 0) { ButtonPress(1, 1); } else { button = TicTac.RandomCorner(array); if (button != 0) { TicTac.ButtonToArray(button, out x, out y); ButtonPress(x, y); } else { RandomMove(); } } } } } }