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
|
// CGame.cpp
|
||||||
//
|
//
|
||||||
#include "CGame.h"
|
#include "CGame.h"
|
||||||
#include "CUserInput.h"
|
|
||||||
#include <random>
|
|
||||||
|
|
||||||
void CGame::Init()
|
void CGame::Init()
|
||||||
{
|
{
|
||||||
@@ -43,7 +41,11 @@ void CGame::Start()
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
PrintGameHeader();
|
PrintGameHeader();
|
||||||
|
#ifdef _DEBUG
|
||||||
|
ShowGuessedNumber(true);
|
||||||
|
#else
|
||||||
ShowGuessedNumber(false);
|
ShowGuessedNumber(false);
|
||||||
|
#endif // DEBUG
|
||||||
PrintSteps();
|
PrintSteps();
|
||||||
ret = GetNumber(step);
|
ret = GetNumber(step);
|
||||||
switch (ret)
|
switch (ret)
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// CGame.h
|
// CGame.h
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "defines.h"
|
#include "headers.h"
|
||||||
#include "CUserInput.h"
|
#include "CUserInput.h"
|
||||||
#include "CStep.h"
|
#include "CStep.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
// CStep.h
|
// CStep.h
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <vector>
|
#include "headers.h"
|
||||||
|
|
||||||
class CStep
|
class CStep
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,11 +1,7 @@
|
|||||||
// CUserInput.h
|
// CUserInput.h
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
#include "defines.h"
|
#include "headers.h"
|
||||||
#include <iostream>
|
|
||||||
#include <string>
|
|
||||||
#include <vector>
|
|
||||||
#include <cwctype>
|
|
||||||
|
|
||||||
class CUserInput
|
class CUserInput
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -142,6 +142,7 @@
|
|||||||
<ClInclude Include="CStep.h" />
|
<ClInclude Include="CStep.h" />
|
||||||
<ClInclude Include="CUserInput.h" />
|
<ClInclude Include="CUserInput.h" />
|
||||||
<ClInclude Include="defines.h" />
|
<ClInclude Include="defines.h" />
|
||||||
|
<ClInclude Include="headers.h" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
|
||||||
<ImportGroup Label="ExtensionTargets">
|
<ImportGroup Label="ExtensionTargets">
|
||||||
|
|||||||
@@ -47,5 +47,8 @@
|
|||||||
<ClInclude Include="defines.h">
|
<ClInclude Include="defines.h">
|
||||||
<Filter>Header Files</Filter>
|
<Filter>Header Files</Filter>
|
||||||
</ClInclude>
|
</ClInclude>
|
||||||
|
<ClInclude Include="headers.h">
|
||||||
|
<Filter>Header Files</Filter>
|
||||||
|
</ClInclude>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
</Project>
|
</Project>
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
// bulls-and-cows.cpp
|
// bulls-and-cows.cpp
|
||||||
//
|
//
|
||||||
#include <Windows.h>
|
#include "headers.h"
|
||||||
#include "..\..\..\MyFunctions\SetUserLocale.h"
|
#include "..\..\..\MyFunctions\SetUserLocale.h"
|
||||||
#include "CGame.h"
|
#include "CGame.h"
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
// defines.h
|
||||||
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#define VERSION 0.3
|
#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