/// <summary> /// Fill grid with values from binary matrix. /// </summary> /// <param name="matrix">Matrix with cell values</param> public Grid(int[,] matrix) { Size = new(matrix.GetLength(0), matrix.GetLength(1)); InitializeGrid(matrix); SetNeighbours(); }
/// <summary> /// Create new game and add it to repository. /// This games will be started executing immediately /// </summary> public void StartNewGame(GridSize size) => _gameRepo.Add(new GameOfLife(size));
/// <summary> /// Create new game. /// </summary> public GameOfLife(GridSize size) { Grid = new Grid(size); Id = _idCounter++; }