public CartesianGrid(int width, int height) { Width = width; Height = height; CellLogic = new CartesianGridCellLogic(); GenerateGrid(); }
public bool TestDetermineIfCellLives(bool isAlive, int liveNeighbors) { CartesianGridCell cell = new CartesianGridCell(0, 0, isAlive); CartesianGridCellLogic logic = new CartesianGridCellLogic(); return logic.DetermineIfCellLives(cell, liveNeighbors); }
public CartesianGrid(string[] lines) { Width = lines[0].Length; Height = lines.Length; CellLogic = new CartesianGridCellLogic(); GenerateGrid(); AddLiveCells(lines); }
public bool TestDoesLiveCellLive(int liveNeighbors) { CartesianGridCellLogic logic = new CartesianGridCellLogic(); return logic.DoesLiveCellLive(liveNeighbors); }