Generator of printable responses
This commit is contained in:
parent
976dd9dc7c
commit
13aaaadcc0
1 changed files with 7 additions and 0 deletions
|
@ -1,7 +1,10 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
#include <string>
|
||||||
|
|
||||||
using std::vector;
|
using std::vector;
|
||||||
|
using std::string;
|
||||||
|
using std::to_string;
|
||||||
|
|
||||||
vector<int> validate(vector<int> sequence, vector<int> guess) {
|
vector<int> validate(vector<int> sequence, vector<int> guess) {
|
||||||
int S = sequence.size();
|
int S = sequence.size();
|
||||||
|
@ -35,3 +38,7 @@ vector<int> validate(vector<int> sequence, vector<int> guess) {
|
||||||
|
|
||||||
return {r_somewhere, r_correct};
|
return {r_somewhere, r_correct};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
string format_response(vector<int> response) {
|
||||||
|
return to_string(response[0]) + " somewhere / " + to_string(response[1]) + "on the right spot\n";
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue