public Cell(int row, int col, bool isMine) { MinesAround = 0; _row = row; _col = col; Visibility = CellVisibility.Hidden; IsMine = isMine; }
public void Reveal(Board board) { if (!IsMine) { BrowseAllCells(board, CountMinesAround); BrowseAllCells(board, Reveal); } Visibility = CellVisibility.Revealed; }
public void Reveal2(Board board) { CellAction2 += CountMinesAround; CellAction2 += Reveal; if (!IsMine) { BrowseAllCells2(board); } Visibility = CellVisibility.Revealed; }
/// <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]; }