Skip to content

Commit

Permalink
Update WordlInSix.java
Browse files Browse the repository at this point in the history
  • Loading branch information
V999TEC committed Jul 12, 2022
1 parent f925400 commit f2e0feb
Showing 1 changed file with 40 additions and 40 deletions.
80 changes: 40 additions & 40 deletions src/uk/co/myzen/a_z/WordlInSix.java
Original file line number Diff line number Diff line change
Expand Up @@ -1162,48 +1162,48 @@ private String selectCandidate() {

List<String> rankings = rankCandidatesByLetterDistribution(candidates);

char[] inferred = inferenceCheck();

int r = 0; // By default just select the one at the front of the list

if (null != inferred) {

do {

// before adding as a candidate check for inferences
// that would eliminate the prime candidate

String primeCandidate = rankings.get(r);

boolean disregard = false;

int colIndex = 0;

for (char ch : inferred) {

if (' ' != ch) {

if (primeCandidate.charAt(colIndex) != ch) {

System.out.println("Disregarding candidate " + primeCandidate + " due to inference");

disregard = true;
break;
}
}

colIndex++;
}

if (!disregard) {

break;
}

r++;

} while (r < rankings.size() - 1);
}
// char[] inferred = inferenceCheck();
//
// if (null != inferred) {
//
// do {
//
// // before adding as a candidate check for inferences
// // that would eliminate the prime candidate
//
// String primeCandidate = rankings.get(r);
//
// boolean disregard = false;
//
// int colIndex = 0;
//
// for (char ch : inferred) {
//
// if (' ' != ch) {
//
// if (primeCandidate.charAt(colIndex) != ch) {
//
// System.out.println("Disregarding candidate " + primeCandidate + " due to inference");
//
// disregard = true;
// break;
// }
// }
//
// colIndex++;
// }
//
// if (!disregard) {
//
// break;
// }
//
// r++;
//
// } while (r < rankings.size() - 1);
// }

return rankings.get(r);
}
Expand Down

0 comments on commit f2e0feb

Please sign in to comment.