Exemplo n.º 1
0
        public void Start()
        //	Start the generation
        //		calculation loop.
        {
            // Remove the menu.  Must be done here because
            //    this control is responsible for erasing
            //    its own background.
            Redraw();

            //	Save the current pattern, for
            //		"reset" purposes.
            genCurr.CopyTo(genZero);

            //	Clear all previous patterns.
            genPrev.SetPattern(lgpPattern.lgpEmpty);
            genGrand.SetPattern(lgpPattern.lgpEmpty);
            genFour.SetPattern(lgpPattern.lgpEmpty);

            //	Init some properties.
            dtStart = DateTime.Now;

            //	Start calcuating generations
            boolRun = true;
            while (boolRun)
            {
                CalcNextGen();
                boolPaintAll = false;
                OnNextGenReady();
                boolPaintAll = true;
                Thread.Sleep((int)RunSpeed);
            }
        }
Exemplo n.º 2
0
 public void SetPattern(lgpPattern Pattern)
 {
     //	Have the current generation do it.
     genCurr.SetPattern(Pattern);
     Redraw();
 }