public override Move Execute() { var reduced = new List<Move>(); for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { if (_engine.values[i, j] > 0) continue; CheckRowColumnAndSquarePossibilities(i, j, _engine.possibles[i, j], reduced); } } if (reduced.Any()) { var move = new ReducePossibilitiesMove(); move.Reduced = reduced; return move; } else { return null; } }
public override Move Execute() { var reduced = new List <Move>(); for (int i = 0; i < 9; i++) { for (int j = 0; j < 9; j++) { if (_engine.values[i, j] > 0) { continue; } CheckRowColumnAndSquarePossibilities(i, j, _engine.possibles[i, j], reduced); } } if (reduced.Any()) { var move = new ReducePossibilitiesMove(); move.Reduced = reduced; return(move); } else { return(null); } }
public Move PerformReducePossibilitiesMove(ReducePossibilitiesMove move) { WriteLog("Reducing possibilities"); moves.Push(move); return move; }
public Move PerformReducePossibilitiesMove(ReducePossibilitiesMove move) { WriteLog("Reducing possibilities"); moves.Push(move); return(move); }