Candidates after input are now shown

This commit is contained in:
dDogge 2024-12-14 14:44:34 +01:00
parent bf53770297
commit 3f64d13268

View file

@ -21,8 +21,6 @@ int main(int argc, char *argv[]) {
letters_and_indices green, yellow;
while (!candidates.empty()) {
std::cout << "Remaining candidates: " << candidates.size() << "\n\n";
auto [new_wrong, new_green, new_yellow] = prompt();
wrong.append(new_wrong);
green.insert(new_green.begin(), new_green.end());
@ -30,6 +28,12 @@ int main(int argc, char *argv[]) {
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;
}