diff --git a/Aufg5/Mastermind.cpp b/Aufg5/Mastermind.cpp index 9abe542..d51f7a6 100644 --- a/Aufg5/Mastermind.cpp +++ b/Aufg5/Mastermind.cpp @@ -41,14 +41,20 @@ std::vector generateSecretCode(int digits, int optionsPerDigit) { } std::vector getCodeGuessFromConsole() { - std::cout << "Have a Guess! :" << std::endl; - - std::string input; - std::cin >> input; + std::cout << "Have a Guess!" << std::endl; std::vector guess; - split(input, ' ', guess); + // TODO Make limit dynamic + for (int i = 1; i < 5; ++i) { + std::cout << "Enter Digit " << i << " : " << std::endl; + std::string input; + std::cin >> input; + + guess.push_back(input); + } + std::cout << "You entered: " << std::endl; + printAllStringsInVector(guess); return guess; } @@ -68,7 +74,4 @@ void Aufg5Main() { std::vector guess = getCodeGuessFromConsole(); - printAllStringsInVector(guess); - - }