diff --git a/bulls-and-cows-cpp/CGame.cpp b/bulls-and-cows-cpp/CGame.cpp index ad8ecdf..f7c028c 100644 --- a/bulls-and-cows-cpp/CGame.cpp +++ b/bulls-and-cows-cpp/CGame.cpp @@ -59,7 +59,7 @@ void CGame::Start() bool CGame::GetNumber(CStep step) { std::wcout << L"\t\t\t\t\t" << m_sLastError << L"\r"; - std::wcout << L"=>\t"; + std::wcout << "=>\t"; CUserInput userInput(m_ucDigits); @@ -119,6 +119,12 @@ void CGame::PrintGameFooter() std::wcout << L"\tКоличество ходов: " << m_uStepCounter << L"\n\n" << std::endl; } +void CGame::PrintGameInitialQuery() +{ + std::wcout << L"Введите количество цифр в числе (от 3 до 5).\n"; + std::wcout << L"Чем больше цифр - тем сложнее. Обычно 4.\n" << std::endl; +} + void CGame::PrintSteps() { if (m_Steps.size() < 1) return; @@ -141,9 +147,8 @@ CGame::CGame() do { PrintGameHeader(); - std::wcout << L"Введите количество цифр в числе (от 3 до 5).\n"; - std::wcout << L"Чем больше цифр - тем сложнее. Обычно 4.\n\n"; - std::wcout << L"=> "; + PrintGameInitialQuery(); + std::wcout << "=> "; if (userInput.Get()) { diff --git a/bulls-and-cows-cpp/CGame.h b/bulls-and-cows-cpp/CGame.h index 36405a1..e3da5a9 100644 --- a/bulls-and-cows-cpp/CGame.h +++ b/bulls-and-cows-cpp/CGame.h @@ -22,6 +22,7 @@ private: void ShowGuessedNumber(bool); void PrintGameHeader(); void PrintGameFooter(); + void PrintGameInitialQuery(); void PrintSteps(); template