示例#1
0
 public FractalGen(int height, int width) : base(height, width)
 {
     GridCells = new Cell[height, width];
     for (int ii = 0; ii < height; ++ii)
     {
         for (int jj = 0; jj < width; ++jj)
         {
             GridCells[ii, jj] = new Cell
             {
                 Name    = "Cell",
                 Row     = ii,
                 Col     = jj,
                 Enabled = false
             };
         }
     }
     rules = new ToothpickRules(GridCells);
     Force(height / 2, width / 2);
 }
示例#2
0
 public FractalChromeGen(int height, int width) : base(height, width)
 {
     GridCells = new ChromaticCell[height, width];
     for (int ii = 0; ii < height; ++ii)
     {
         for (int jj = 0; jj < width; ++jj)
         {
             GridCells[ii, jj] = new ChromaticCell
             {
                 Name       = "Cell",
                 Background = new SolidColorBrush(Colors.Black),
                 Row        = ii,
                 Col        = jj,
                 Enabled    = false,
                 Life       = 0
             };
         }
     }
     rules = new ToothpickRules(GridCells);
     Force(height / 2, width / 2);
 }