Beispiel #1
0
        public void MultiStep(int stepCount)
        {
            StepInfo stepInfos = new StepInfo();

            for (int step = 0; step < stepCount; step++)
            {
                StepInfo stepInfo = area.NextStep();
                foreach (Cell cell in stepInfo.ChangedCells)
                {
                    stepInfos.AddCell(cell);
                }
            }

            foreach (Cell cell in stepInfos.ChangedCells)
            {
                if (!rectangles.ContainsKey(cell))
                {
                    continue;
                }

                Rectangle rectangle = rectangles[cell];
                if (rectangle != null)
                {
                    RefreshRectangle(rectangle, cell);
                }
            }
        }