This commit is contained in:
Matúš Púll 2024-11-04 19:17:26 +01:00
parent 8bbfb250d2
commit 7889133977

View file

@ -15,9 +15,11 @@ public:
} }
// Utility functions // Utility functions
// Prints what the solver deduced
void print() { void print() {
known.print(); known.print();
} }
// Clean guess and response from info we know
Historic_guess clean(Historic_guess hist) { Historic_guess clean(Historic_guess hist) {
// The in-place colors we know // The in-place colors we know
for(int n = 0; n < N; n++) { for(int n = 0; n < N; n++) {
@ -43,6 +45,7 @@ public:
return hist; return hist;
} }
// For each color, get where it was guessed
vector<vector<int>> get_positions_of_colors(vector<int> guess) { vector<vector<int>> get_positions_of_colors(vector<int> guess) {
auto positions_of_colors = vector<vector<int>>(M, vector<int>(0)); auto positions_of_colors = vector<vector<int>>(M, vector<int>(0));
for(int n = 0; n < N; n++) for(int n = 0; n < N; n++)