Ejemplo n.º 1
0
        private ListСell GetRemovedMarkedMines()
        {
            var markMineList = new ListСell();

            foreach (Сell field in Mines)
            {
                if (Marks.IsPresent(field))
                {
                    Marks.Remove(field);
                    Mines.Remove(field);
                    markMineList.Add(new CellMine(field, true));
                }
            }

            return(markMineList);
        }
Ejemplo n.º 2
0
 public Сell this[int row, int column]
 {
     get
     {
         if (VisibleСells.IsPresent(new Сell(row, column)))
         {
             return(VisibleСells[row, column]);
         }
         else if (Marks.IsPresent(new Сell(row, column)))
         {
             return(Marks[row, column]);
         }
         else
         {
             return(new CellAbsent(new Сell(row, column)));
         }
     }
 }