Пример #1
0
 public override void Dispose()
 {
     base.Dispose();
     Gems.Clear();
     IGems.Clear();
     CellsList.Clear();
 }
Пример #2
0
        private void FillCells(double[] input)
        {
            var j = 0;

            for (var i = 0; i < Count; i++)
            {
                CellsList.Add(new Cell(i + j, input[i]));
                j++;
            }
        }
Пример #3
0
        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();
        }
Пример #4
0
 public bool IsFull()
 {
     return(CellsList.All(cell => !cell.IsEmpty()));
 }