diff --git a/Aufg5/Mastermind.cpp b/Aufg5/Mastermind.cpp index 0cdfa41..9abe542 100644 --- a/Aufg5/Mastermind.cpp +++ b/Aufg5/Mastermind.cpp @@ -8,6 +8,8 @@ #include #include +#include "../Aufg4/CrimeStats.h" + int getRandomNumberInRange(int min, int max) { static std::mt19937 generator(static_cast(time(nullptr))); std::uniform_int_distribution distribution(min, max); @@ -38,6 +40,18 @@ std::vector generateSecretCode(int digits, int optionsPerDigit) { return secretCode; } +std::vector getCodeGuessFromConsole() { + std::cout << "Have a Guess! :" << std::endl; + + std::string input; + std::cin >> input; + + std::vector guess; + + split(input, ' ', guess); + + return guess; +} @@ -52,5 +66,9 @@ void Aufg5Main() { printAllStringsInVector(SecretCode); + std::vector guess = getCodeGuessFromConsole(); + + printAllStringsInVector(guess); + }