Exemplo n.º 1
0
 void Update(CellUpdator updator, bool createBuffer)
 {
     Cell[,] target;
     if (createBuffer)
     {
         target = NewBoard();
     }
     else
     {
         target = cells;
     }
     for (int x = 0; x < width; x++)
     {
         for (int y = 0; y < height; y++)
         {
             target[x, y].Value = updator(cells[x, y]);
         }
     }
     cells = target;
 }
Exemplo n.º 2
0
 public void UpdateInPlace(CellUpdator updator)
 {
     Update(updator, false);
 }
Exemplo n.º 3
0
 public void Update(CellUpdator updator)
 {
     Update(updator, true);
 }