예제 #1
0
        public void Init(string[] lines)
        {
            Lines      = lines;
            numbersOPS = new Stopwatch();
            numbersOP  = new Stopwatch();
            SolverOPS  = new NumbersOnePossibilitySolver();
            SolverOP   = new NumbersOnePlace();

            List <char> Puzzle = new List <Char>();

            if (lines[0] == "4")
            {
                board           = new FourBoard();
                board.BoardSize = 4;
            }
            if (lines[0] == "9")
            {
                board           = new NineBoard();
                board.BoardSize = 9;
            }
            for (int i = 2; i < lines.Length; i++)
            {
                ParseSudokuPuzzle.ParsePuzzleLine(lines[i], Puzzle);
            }
            board.Init(Puzzle);
        }