diff --git a/main.cpp b/main.cpp index a81babd..979c6b8 100644 --- a/main.cpp +++ b/main.cpp @@ -32,11 +32,9 @@ int main(int argc, char* argv[]) { cin >> sequence[n]; } - // Terminal clearing - cout << std::endl; - // Human info if(player == HUMAN) { + cout << std::endl; cout << "Guesses are " << N << " space-separated numbers from 0 to " << M-1 << std::endl << "Responses are in format [correct out of place] / [correct in place]" << std::endl; cout << std::endl; @@ -49,20 +47,18 @@ int main(int argc, char* argv[]) { vector> history = {}; for(int guesses = 0; guesses < 10; guesses++) { vector guess(N), response; - cout << "Guess " << history.size() << " : "; // Bot playin if(player == BOT) { guess = bot.guess(); - cout << format_guess(guess); response = validate(sequence, guess); - cout << format_response(response); bot.learn(guess, response); } // Human playing else if(player == HUMAN) { + cout << "Guess " << history.size() << " : "; for(int n = 0; n < N; n++) cin >> guess[n]; @@ -83,7 +79,8 @@ int main(int argc, char* argv[]) { cout << std::endl; // Print game history - cout << "History\n"; + if(player == HUMAN) + cout << "History\n"; for(auto guess : history) cout << format_guess_history(sequence, guess) << std::endl;