diff --git a/solver.hpp b/solver.hpp index a44e9cf..94303bf 100644 --- a/solver.hpp +++ b/solver.hpp @@ -51,7 +51,7 @@ public: if(guess[n] > -1) positions_of_colors[guess[n]].push_back(n); - // If color can't be anywhere here, it can't be in the sequence + // If color isn't here, it can't be in the sequence for(int col = 0; col < known.M; col++) { int possible_count = 0; for(int n : positions_of_colors[col]) @@ -73,7 +73,7 @@ public: } bool extract_info(Historic_guess hist) { - bool something_to_learn; + bool something_to_learn = true; // A bit of cleaning auto cleaned = clean(hist); @@ -87,21 +87,15 @@ public: } // None at the right spot - else if(response[1] == 0) { + else if(response[1] == 0) not_here(guess); - something_to_learn = false; - } // At least only on the right spot - else if(response[0] == 0) { + else if(response[0] == 0) if_not_here_then_nowhere(guess); - something_to_learn = true; - } // Nonzero / nonzero - else { - something_to_learn = true; - } + else {} return something_to_learn; }