示例#1
0
 public Solver(SudokerGrid grid, SolutionList solutions)
 {
     sGrid = grid;
     iGrid = grid.Items;
     solutionList = solutions;
     bRow = new BitVector32[9];
     bCol = new BitVector32[9];
     bBox = new BitVector32[9];
 }
示例#2
0
 public Explorer(SudokerGrid grid)
 {
     sGrid = grid;
     iGrid = grid.Items;
     bGrid = new BitVector32[9][];
     for (int row = 0; row < 9; row++)
     {
         bGrid[row] = new BitVector32[9];
     }
     OneBits();
 }
示例#3
0
        public MainWindow()
        {
            InitializeComponent();
            sudokerGrid = new SudokerGrid();
            uiGrid.ItemsSource = sudokerGrid.Items;
            solutionChooser.ItemsSource = sudokerGrid.SolutionList.Solutions;
            sudokerGrid.Explore();

            //for (int i = 1; i < 7; i++)
            //{
            //	for (int j = 1; j < 8; j++)
            //	{
            //		sudokerGrid.Set(i, j, (i * 3 + i / 3 + j) % 9 + 1, true);
            //	}
            //}
        }