Пример #1
0
 public Cell(int row, int col, bool isMine)
 {
     MinesAround = 0;
     _row        = row;
     _col        = col;
     Visibility  = CellVisibility.Hidden;
     IsMine      = isMine;
 }
Пример #2
0
 public Cell(int row, int col, bool isMine)
 {
     MinesAround = 0;
     _row = row;
     _col = col;
     Visibility = CellVisibility.Hidden;
     IsMine = isMine;
 }
Пример #3
0
 public void Reveal(Board board)
 {
     if (!IsMine)
     {
         BrowseAllCells(board, CountMinesAround);
         BrowseAllCells(board, Reveal);
     }
     Visibility = CellVisibility.Revealed;
 }
Пример #4
0
 public void Reveal2(Board board)
 {
     CellAction2 += CountMinesAround;
     CellAction2 += Reveal;
     
     if (!IsMine)
     {
         BrowseAllCells2(board);
     }
     Visibility = CellVisibility.Revealed;
 }
Пример #5
0
 /// <summary>
 /// Create instance of dungeon with given size
 /// </summary>
 /// <param name="Width">Width of the dungeon</param>
 /// <param name="Height">Height of the dungeon</param>
 /// <param name="Generator">
 /// Generator to use to build the dungeon.
 /// Defaults to DefaultGenerator
 /// </param>
 public Dungeon(int Width, int Height)
 {
     TileMap       = new DungeonCell[Width, Height];
     VisibilityMap = new CellVisibility[Width, Height];
 }