Get all possible colors for all positions
This commit is contained in:
parent
7889133977
commit
d5f5a02523
1 changed files with 10 additions and 1 deletions
|
@ -45,7 +45,7 @@ public:
|
|||
return -1;
|
||||
}
|
||||
|
||||
// Print known information
|
||||
// Get known information
|
||||
void print() {
|
||||
cout << " ";
|
||||
for(int col = 0; col < M; col++)
|
||||
|
@ -58,6 +58,15 @@ public:
|
|||
cout << std::endl;;
|
||||
}
|
||||
}
|
||||
// Get all possible colors for all positions
|
||||
vector<vector<int>> list_all_possibilities() {
|
||||
auto r = vector<vector<int>>(N, vector<int>(0));
|
||||
for(int col = 0; col < M; col++)
|
||||
for(int n = 0; n < N; n++)
|
||||
if(possible[n][col])
|
||||
r[col].push_back(n);
|
||||
return r;
|
||||
}
|
||||
};
|
||||
|
||||
// For remembering guesses with their responses
|
||||
|
|
Loading…
Reference in a new issue