Added the output of number of total steps at the end of game.

This commit is contained in:
2023-06-30 15:58:57 +03:00
parent 4b634caf52
commit c0dfdf53bb
2 changed files with 4 additions and 3 deletions

View File

@@ -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()

View File

@@ -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[])
{