public static SudokuCandidate[] CheckRemains(SudokuSolver ss, SudokuGrid.CageInfo info, int cage, int ex) { int s = info.remaining_sizes[cage]; if (s == 1) { // One empty cell remains in the cage, so make the total int total = info.remaining_totals[cage]; return(Filter(ss, cage, (int n) => (n == total))); } /* * else if(s > 1) * { * // 's' numbers left to choose from * int total = info.remaining_totals[cage]; * int m0 = total - 45 + (11 - s) * (10 - s) / 2; * int m1 = total - s * (s - 1) / 2; * Filter(ss, cage, (int n) => n == ex || (n >= m0 && n <= m1)); * } * */ return(null); }
public CageOptional(SudokuGrid.CageInfo info) { this.info = info; }