コード例 #1
0
 void before_each()
 {
     _sourceList = new List<int>
         {
             1, 2, 3, 4, 5, 6, 7, 8, 9
         };
     _subject = new Grid<int>(_sourceList);
 }
コード例 #2
0
ファイル: GridHelper.cs プロジェクト: agamya/GameOfLife
        public static IGrid CreateGrid(IGridSize gridSize, IEnumerable<ICell> liveCells)
        {
            var grid = new Grid(gridSize);
            //Mark all cells
            foreach (var liveCell in liveCells)
            {
                grid.MakeCell(liveCell.Position, liveCell.Alive);
            }

            return grid;
        }