mirror of
https://gitflic.ru/project/w0lf/bulls-and-cows-cpp.git
synced 2026-03-28 16:02:46 +03:00
Moved header's includes into separete header file.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
// CGame.cpp
|
||||
//
|
||||
#include "CGame.h"
|
||||
#include "CUserInput.h"
|
||||
#include <random>
|
||||
|
||||
void CGame::Init()
|
||||
{
|
||||
@@ -43,7 +41,11 @@ void CGame::Start()
|
||||
do
|
||||
{
|
||||
PrintGameHeader();
|
||||
#ifdef _DEBUG
|
||||
ShowGuessedNumber(true);
|
||||
#else
|
||||
ShowGuessedNumber(false);
|
||||
#endif // DEBUG
|
||||
PrintSteps();
|
||||
ret = GetNumber(step);
|
||||
switch (ret)
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// CGame.h
|
||||
//
|
||||
#pragma once
|
||||
#include "defines.h"
|
||||
#include "headers.h"
|
||||
#include "CUserInput.h"
|
||||
#include "CStep.h"
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// CStep.h
|
||||
//
|
||||
#pragma once
|
||||
#include <vector>
|
||||
#include "headers.h"
|
||||
|
||||
class CStep
|
||||
{
|
||||
|
||||
@@ -1,11 +1,7 @@
|
||||
// CUserInput.h
|
||||
//
|
||||
#pragma once
|
||||
#include "defines.h"
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cwctype>
|
||||
#include "headers.h"
|
||||
|
||||
class CUserInput
|
||||
{
|
||||
|
||||
@@ -142,6 +142,7 @@
|
||||
<ClInclude Include="CStep.h" />
|
||||
<ClInclude Include="CUserInput.h" />
|
||||
<ClInclude Include="defines.h" />
|
||||
<ClInclude Include="headers.h" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||
<ImportGroup Label="ExtensionTargets">
|
||||
|
||||
@@ -47,5 +47,8 @@
|
||||
<ClInclude Include="defines.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="headers.h">
|
||||
<Filter>Header Files</Filter>
|
||||
</ClInclude>
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
@@ -1,6 +1,6 @@
|
||||
// bulls-and-cows.cpp
|
||||
//
|
||||
#include <Windows.h>
|
||||
#include "headers.h"
|
||||
#include "..\..\..\MyFunctions\SetUserLocale.h"
|
||||
#include "CGame.h"
|
||||
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
// defines.h
|
||||
//
|
||||
#pragma once
|
||||
|
||||
#define VERSION 0.3
|
||||
|
||||
11
bulls-and-cows-cpp/headers.h
Normal file
11
bulls-and-cows-cpp/headers.h
Normal file
@@ -0,0 +1,11 @@
|
||||
// headers.h
|
||||
//
|
||||
#pragma once
|
||||
#include <Windows.h>
|
||||
#include <iostream>
|
||||
#include <random>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include <cwctype>
|
||||
|
||||
#include "defines.h"
|
||||
Reference in New Issue
Block a user