예제 #1
0
 static void DisplayGrid(Grid <Cell> grid)
 {
     for (var i = 0; i < length; i++)
     {
         StringBuilder row = new StringBuilder();
         for (var j = 0; j < width; j++)
         {
             Cell   cell           = grid.QueryContents(i, j);
             String cellAppearance = DisplayCell(cell);
             row.Append(cellAppearance);
         }
         Console.WriteLine(row);
     }
 }
예제 #2
0
 public void ContainsCells()
 {
     Assert.IsInstanceOf <Cell> (grid.QueryContents(1, 2));
 }
예제 #3
0
 public void PlaceLivingCell(int x, int y)
 {
     cell = grid.QueryContents(x, y);
     cell.Live();
 }