mirror of
https://gitflic.ru/project/w0lf/bulls-and-cows-cpp.git
synced 2026-03-28 16:02:46 +03:00
Added the output of number of total steps at the end of game.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
// CGame.cpp
|
||||
//
|
||||
#include "CGame.h"
|
||||
//#include <vector>
|
||||
#include <string>
|
||||
#include <random>
|
||||
#include <cwctype>
|
||||
@@ -51,6 +50,7 @@ void CGame::Start()
|
||||
ret = GetNumber(step);
|
||||
if (ret == -1) return;
|
||||
} while (ret < 0);
|
||||
m_uStepCounter++;
|
||||
}
|
||||
|
||||
PrintGameHeader();
|
||||
@@ -85,7 +85,8 @@ void CGame::PrintGameHeader()
|
||||
|
||||
void CGame::PrintGameFooter()
|
||||
{
|
||||
std::wcout << L"\n\n\t" << L"!!! П О Б Е Д А !!!" << L"\n\n" << std::endl;
|
||||
std::wcout << L"\n\n\t" << L"!!! П О Б Е Д А !!!" << std::endl;
|
||||
std::wcout << L"\tКоличество ходов: " << m_uStepCounter << L"\n\n" << std::endl;
|
||||
}
|
||||
|
||||
void CGame::PrintSteps()
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#include <Windows.h>
|
||||
#include "..\..\..\MyFunctions\SetUserLocale.h"
|
||||
#include "CGame.h"
|
||||
#include <iostream>
|
||||
//#include <iostream>
|
||||
|
||||
int wmain(int argc, wchar_t* argv[])
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user