Beispiel #1
0
 public void AddAroundCell(ICell cell)
 {
     if (cell.HasMine)
     {
         minesNumber++;
     }
     aroundCells.Add(cell);
 }
Beispiel #2
0
 public void AddCell(ICell cell, Point2D[] cellContour)
 {
     if (cell != null)
     {
         SetColor(IntToColor(cells.Count));
         cells.Add(cell);
         Canvas.FillPolygon(brush, cellContour);
     }
 }
Beispiel #3
0
 public void CreateCells(List <CellData> cellsDataList)
 {
     foreach (var cellData in cellsDataList)
     {
         CellsCollection.Add(new CellBlock(_mainBlockViewModel, cellData));
         CellsCollection.Last().PropertyChanged += RowBlockViewModel_PropertyChanged;
         CellsCollection.Last().SelectMode       = _mainBlockViewModel.SelectMode;
     }
 }