src/Kingdom.OrTools.Samples.Sudoku/Model/SudokuPuzzle.Puzzle.cs
/// <summary>
/// Returns the Block at each <paramref name="row"/> and <paramref name="column"/>.
/// </summary>
/// <param name="row"></param>
/// <param name="column"></param>
/// <returns></returns>
Returns the Block at each  and .
Returns the Block at each and .
private IDictionary<Address, int> GetBlock(int row, int column)
        {
            Debug.Assert(row >= 0 && row < BlockSize);
            Debug.Assert(column >= 0 && column < BlockSize);
            var result = new Dictionary<Address, int>();
            for (var rowDelta = 0; rowDelta < BlockSize; rowDelta++)
            {
                for (var columnDelta = 0; columnDelta < BlockSize; columnDelta++)
                {
                    var address = new Address(row * BlockSize + rowDelta, column * BlockSize + columnDelta);
                    result[address] = this[address];
                }
            }
            return result;
        }
private IDictionary < Address , int > GetBlock ( int row , int column ) { Debug . Assert ( row >= 0 && row < BlockSize ) ; Debug . Assert ( column >= 0 && column < BlockSize ) ; var result = new Dictionary < Address , int > ( ) ; for ( var rowDelta = 0 ; rowDelta < BlockSize ; rowDelta ++ ) { for ( var columnDelta = 0 ; columnDelta < BlockSize ; columnDelta ++ ) { var address = new Address ( row * BlockSize + rowDelta , column * BlockSize + columnDelta ) ; result [ address ] = this [ address ] ; } } return result ; }
Returns the Block at each  and .
Returns the Block at each and .
None
row
int
None
column
int
None