Formatting printable guesses

This commit is contained in:
Matúš Púll 2024-11-02 16:56:20 +01:00
parent 13aaaadcc0
commit eabdc8757e

View file

@ -42,3 +42,10 @@ vector<int> validate(vector<int> sequence, vector<int> guess) {
string format_response(vector<int> response) { string format_response(vector<int> response) {
return to_string(response[0]) + " somewhere / " + to_string(response[1]) + "on the right spot\n"; return to_string(response[0]) + " somewhere / " + to_string(response[1]) + "on the right spot\n";
} }
string format_guess(vector<int> guess) {
string r = "";
for(int col : guess)
r += to_string(col) + " ";
r += "\n";
return r;
}