public override void Dispose() { base.Dispose(); Gems.Clear(); IGems.Clear(); CellsList.Clear(); }
private void FillCells(double[] input) { var j = 0; for (var i = 0; i < Count; i++) { CellsList.Add(new Cell(i + j, input[i])); j++; } }
private void GenerateNewCellsAndNeighbours() { Random rnd = new Random(); for (var y = 0; y < CellsCountY; y++) { for (var x = 0; x < CellsCountX; x++) { CellStatus newStastus = (CellStatus)rnd.Next(0, 2); ICellModel cell = new CellModel(x, y, newStastus); Cells[x, y] = cell; CellsList.Append(cell); } } FindNeighbours(); }
public bool IsFull() { return(CellsList.All(cell => !cell.IsEmpty())); }