Example #1
0
 /// <summary>
 /// Creates a Template based on a Region from the Sudoku Board
 /// </summary>
 /// <param name="pRegion"></param>
 public RegionTemplate(SudokuRegion pRegion)
 {
     CellCoord = new int[pRegion.Cells.Length, 2];
     for (int i = 0; i < pRegion.Length; i++)
     {
         CellCoord[i, 0] = pRegion.Cells[i].Row;
         CellCoord[i, 1] = pRegion.Cells[i].Column;
     }
 }
Example #2
0
 /// <summary>
 /// Default Constructor.
 /// </summary>
 /// <param name="pDimension"></param>
 public Sudoku(int pDimension)
 {
     InitializeComponent();
     Dimension = pDimension;
     CellGrid  = new SudokuCell[Dimension, Dimension];
     Regions   = new SudokuRegion[Dimension];
     for (int i = 0; i < Dimension; i++)
     {
         Regions[i] = new SudokuRegion(Dimension);
     }
     Tetrominos           = new List <Tetromino>();
     Tetromino.UsedColors = new List <Color>();
     SuspendLayout();
     ArrangeSetup();
     ResumeLayout();
 }