Example #1
0
        public void SetUp()
        {
            ISudokuPuzzleStringImporter importer = new SudokuPuzzleImporter();
            puzzle = importer.Import(INPUT_PUZZLE);

            //strategy = new BruteForceSudokuStrategy();
            strategy = new SimpleBruteForceSudokuStrategy();
            //strategy = new SimpleBruteForceSudokuStrategy2();
            //strategy = new CycleFirstBruteForceSudokuStrategy();
        }
Example #2
0
    private XmlNode CreateInputPuzzleNode()
    {
        ISudokuPuzzleStringImporter si = new SudokuPuzzleImporter();
        inputPuzzle = si.Import("0,0,0,0,5,1,2,0,0\n2,0,1,0,9,0,0,8,5\n0,9,4,0,0,2,0,0,7\n6,0,0,0,2,0,7,3,0\n9,0,0,0,8,0,0,0,1\n0,3,8,0,7,0,0,0,6\n7,0,0,2,0,0,8,5,0\n3,8,0,0,4,0,1,0,9\n0,0,6,9,3,0,0,0,0");

        //ISudokuPuzzle inputPuzzle = new SudokuPuzzle(PUZZLE_SIZE);
        ISudokuPuzzleXmlExporter exporter = new SudokuPuzzleExporter();
        XmlNode puzzleNode = exporter.Export(inputPuzzle);
        XmlElement inputPuzzleNode = puzzleNode.OwnerDocument.CreateElement("InputPuzzle");
        inputPuzzleNode.AppendChild(puzzleNode);

        return inputPuzzleNode;
    }