Exemplo n.º 1
0
        public void process(FeatureSketch featureSketch)
        {
            Sketch.Sketch       sketch = featureSketch.Sketch;
            ISketchModification actionToTake;
            const int           MAX_ITERATIONS = 50;

            int i = 0;

            while ((actionToTake = _searchMethod.chooseAction(_domain.SketchModifications(sketch), _domain, sketch)) != null)
            {
                i++;
                if (i > MAX_ITERATIONS)
                {
                    return;
                }
                actionToTake.perform();
            }
        }
Exemplo n.º 2
0
        public void process(FeatureSketch featureSketch)
        {
            _producer.Start(featureSketch);

            Sketch.Sketch      sketch = featureSketch.Sketch;
            SketchModification actionToTake;

            for (int i = 0; i < MAX_ITERATIONS; i++)
            {
                List <SketchModification> modifications = _producer.SketchModifications(featureSketch);
                actionToTake = _searchMethod.chooseAction(modifications, sketch);
                if (actionToTake == null)
                {
                    break;
                }

                if (debug)
                {
                    Console.WriteLine("Performing action: " + actionToTake);
                }

                actionToTake.perform();
            }
        }