From eabdc8757ed19661e3b658d3924ab6b51a9f0d08 Mon Sep 17 00:00:00 2001 From: Matuush Date: Sat, 2 Nov 2024 16:56:20 +0100 Subject: [PATCH] Formatting printable guesses --- validate.hpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/validate.hpp b/validate.hpp index 0337f79..887fe4f 100644 --- a/validate.hpp +++ b/validate.hpp @@ -42,3 +42,10 @@ vector validate(vector sequence, vector guess) { string format_response(vector response) { return to_string(response[0]) + " somewhere / " + to_string(response[1]) + "on the right spot\n"; } +string format_guess(vector guess) { + string r = ""; + for(int col : guess) + r += to_string(col) + " "; + r += "\n"; + return r; +}