Also print remaining values from history
This commit is contained in:
parent
1d25ddc3bf
commit
526ef69c4a
1 changed files with 7 additions and 1 deletions
|
@ -67,7 +67,7 @@ string format_guess_history(vector<int> sequence, vector<int> guess) {
|
|||
if(guess[i] == -1) continue;
|
||||
for(int j = 0; j < N; j++) {
|
||||
if(sequence[j] == guess[i]) {
|
||||
r[i] = "\033[32m" + to_string(guess[i]) + "\033[0m";
|
||||
r[i] = "\033[33m" + to_string(guess[i]) + "\033[0m";
|
||||
guess[i] = -1;
|
||||
sequence[i] = -1;
|
||||
break;
|
||||
|
@ -75,6 +75,12 @@ string format_guess_history(vector<int> sequence, vector<int> guess) {
|
|||
}
|
||||
}
|
||||
|
||||
// Remaining values
|
||||
for(int i = 0; i < N; i++) {
|
||||
if(guess[i] != -1)
|
||||
r[i] = to_string(guess[i]);
|
||||
}
|
||||
|
||||
string r_string = "";
|
||||
for(string s : r)
|
||||
r_string += s + " ";
|
||||
|
|
Loading…
Reference in a new issue