示例#1
0
        bool AddClue(int x, int y, int n, CellFlags fx)
        {
            SudokuCandidate sc = (SudokuCandidate)solver.GetCandidate(x, y, n);

            if (solver.TrySelectCandidate(sc))
            {
                // Add clue
                flags[x, y]  = fx;
                values[x, y] = n;
                Updated();
                return(true);
            }
            else
            {
                // Clue cannot be added
                return(false);
            }
        }