Example #1
0
 private void FillEntireDisplayBoard()
 {
     for (int i = 0; i < _board.Width; i++)
     {
         for (int j = 0; j < _board.Height; j++)
         {
             _displayBoard[i, j] = IsMineSquare(new Position(i, j)) ? Instruction.MineDisplayValue : HintGenerator.GetNumberOfMinesFromNeighbourSquares(_board, new Position(i, j)).ToString();
         }
     }
 }
Example #2
0
        private void UpdateDisplayBoard(Position selectedSquarePosition)
        {
            var hint = HintGenerator.GetNumberOfMinesFromNeighbourSquares(_board, selectedSquarePosition).ToString();

            _displayBoard[selectedSquarePosition.X, selectedSquarePosition.Y] = hint;
        }