mirror of
https://gitflic.ru/project/w0lf/bulls-and-cows-cpp.git
synced 2026-03-28 16:02:46 +03:00
Version 0.4
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
// CGame.cpp
|
// Bulls and Cows the game
|
||||||
|
// CGame.cpp
|
||||||
//
|
//
|
||||||
#include "CGame.h"
|
#include "CGame.h"
|
||||||
|
|
||||||
@@ -108,8 +109,8 @@ void CGame::ShowGuessedNumber(bool show)
|
|||||||
void CGame::PrintGameHeader()
|
void CGame::PrintGameHeader()
|
||||||
{
|
{
|
||||||
std::system("cls");
|
std::system("cls");
|
||||||
std::wcout << strGAMENAME << ' ' << strGAMEVERSION << ' ' << VERSION << std::endl;
|
std::wcout << L"Быки и Коровы." << ' ' << L"Версия" << ' ' << VERSION << std::endl;
|
||||||
std::wcout << strGAMECOPYRIGHT << "\n\n\n" << std::endl;
|
std::wcout << L"Copyright (c) 2023 by W0LF aka 'dreamforce'" << "\n\n" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CGame::PrintGameFooter()
|
void CGame::PrintGameFooter()
|
||||||
@@ -142,13 +143,13 @@ CGame::CGame()
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
PrintGameHeader();
|
PrintGameHeader();
|
||||||
std::wcout << L"Введите количество цифр в числе (от 3 до 7).\n";
|
std::wcout << L"Введите количество цифр в числе (от 3 до 5).\n";
|
||||||
std::wcout << L"Чем больше цифр - тем сложнее. Обычно 4.\n";
|
std::wcout << L"Чем больше цифр - тем сложнее. Обычно 4.\n\n";
|
||||||
std::wcout << L"=> ";
|
std::wcout << L"=> ";
|
||||||
|
|
||||||
if (userInput.Get())
|
if (userInput.Get())
|
||||||
{
|
{
|
||||||
if ((userInput.m_vUserInput.at(0) >= 3) && (userInput.m_vUserInput.at(0) <= 7))
|
if ((userInput.m_vUserInput.at(0) >= 3) && (userInput.m_vUserInput.at(0) <= 5))
|
||||||
{
|
{
|
||||||
m_ucDigits = userInput.m_vUserInput.at(0);
|
m_ucDigits = userInput.m_vUserInput.at(0);
|
||||||
ok = true;
|
ok = true;
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Bulls and Cows the game
|
||||||
// CGame.h
|
// CGame.h
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Bulls and Cows the game
|
||||||
// CStep.cpp
|
// CStep.cpp
|
||||||
//
|
//
|
||||||
#include "CStep.h"
|
#include "CStep.h"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Bulls and Cows the game
|
||||||
// CStep.h
|
// CStep.h
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Bulls and Cows the game
|
||||||
// CUserInput.cpp
|
// CUserInput.cpp
|
||||||
//
|
//
|
||||||
#include "CUserInput.h"
|
#include "CUserInput.h"
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Bulls and Cows the game
|
||||||
// CUserInput.h
|
// CUserInput.h
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Bulls and Cows the game
|
||||||
// bulls-and-cows.cpp
|
// bulls-and-cows.cpp
|
||||||
//
|
//
|
||||||
#include "headers.h"
|
#include "headers.h"
|
||||||
|
|||||||
@@ -1,11 +1,8 @@
|
|||||||
|
// Bulls and Cows the game
|
||||||
// defines.h
|
// defines.h
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
#define VERSION 0.4
|
||||||
#define VERSION 0.3
|
|
||||||
#define strGAMENAME L"Áûêè è Êîðîâû."
|
|
||||||
#define strGAMEVERSION L"Âåðñèÿ"
|
|
||||||
#define strGAMECOPYRIGHT L"Copyright (c) 2023 by W0LF aka 'dreamforce'"
|
|
||||||
|
|
||||||
#ifdef _DEBUG
|
#ifdef _DEBUG
|
||||||
#define IS_SHOW true
|
#define IS_SHOW true
|
||||||
|
|||||||
@@ -1,3 +1,4 @@
|
|||||||
|
// Bulls and Cows the game
|
||||||
// headers.h
|
// headers.h
|
||||||
//
|
//
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|||||||
Reference in New Issue
Block a user