예제 #1
0
 private void Add1dVerifyers()
 {
     //Dim = 0
     for (int i = 0; i < 9; i++)
     {
         for (int j = 0; j < 9; j++)
         {
             Verifyer verifyer = new Verifyer(new SodukoBoard1d(board, 0, i, j));
             for (int k = 0; k < 9; k++)
             {
                 var square = board.Board[k, i, j];
                 square.AddVerifyer(verifyer);
             }
         }
     }
     //Dim = 1
     for (int i = 0; i < 9; i++)
     {
         for (int j = 0; j < 9; j++)
         {
             Verifyer verifyer = new Verifyer(new SodukoBoard1d(board, 1, i, j));
             for (int k = 0; k < 9; k++)
             {
                 var square = board.Board[i, k, j];
                 square.AddVerifyer(verifyer);
             }
         }
     }
     //Dim = 2
     for (int i = 0; i < 9; i++)
     {
         for (int j = 0; j < 9; j++)
         {
             Verifyer verifyer = new Verifyer(new SodukoBoard1d(board, 2, i, j));
             for (int k = 0; k < 9; k++)
             {
                 var square = board.Board[i, j, k];
                 square.AddVerifyer(verifyer);
             }
         }
     }
 }
예제 #2
0
 private void AddSubSquares()
 {
     for (int dimension = 0; dimension < 3; dimension++)
     {
         for (int index = 0; index < 9; index++)
         {
             for (int i = 0; i < 3; i++)
             {
                 for (int j = 0; j < 3; j++)
                 {
                     SodukoSubBoard sodukoSubBoard = new SodukoSubBoard(board, dimension, index, i, j);
                     Verifyer       verifyer       = new Verifyer(sodukoSubBoard);
                     foreach (var square in sodukoSubBoard.To9List())
                     {
                         square.AddVerifyer(verifyer);
                     }
                 }
             }
         }
     }
 }
예제 #3
0
 internal void AddVerifyer(Verifyer v)
 {
     Verifyables.Add(v);
 }