Candidates after input are now shown
This commit is contained in:
parent
bf53770297
commit
3f64d13268
1 changed files with 6 additions and 2 deletions
8
main.cc
8
main.cc
|
@ -21,8 +21,6 @@ int main(int argc, char *argv[]) {
|
||||||
letters_and_indices green, yellow;
|
letters_and_indices green, yellow;
|
||||||
|
|
||||||
while (!candidates.empty()) {
|
while (!candidates.empty()) {
|
||||||
std::cout << "Remaining candidates: " << candidates.size() << "\n\n";
|
|
||||||
|
|
||||||
auto [new_wrong, new_green, new_yellow] = prompt();
|
auto [new_wrong, new_green, new_yellow] = prompt();
|
||||||
wrong.append(new_wrong);
|
wrong.append(new_wrong);
|
||||||
green.insert(new_green.begin(), new_green.end());
|
green.insert(new_green.begin(), new_green.end());
|
||||||
|
@ -30,6 +28,12 @@ int main(int argc, char *argv[]) {
|
||||||
|
|
||||||
do_filter(candidates, wrong, green, yellow);
|
do_filter(candidates, wrong, green, yellow);
|
||||||
|
|
||||||
|
std::cout << "Remaining candidates: " << candidates.size() << "\n";
|
||||||
|
for (const auto &word : candidates) {
|
||||||
|
std::cout << word << " ";
|
||||||
|
}
|
||||||
|
std::cout << "\n\n";
|
||||||
|
|
||||||
if (candidates.size() <= 1) break;
|
if (candidates.size() <= 1) break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue