«Угадай, что выбрал компьютер: 0 или 1?»
Минималистичная, но глубокая текстовая игра с несколькими режимами, настройками, достижениями и пасхалками.
Написана на C++ с использованием современных практик и без внешних зависимостей.
2-beta — вторая публичная бета-версия
- Классический — угадывай 0/1 на каждом уровне.
- «Всё или ничего» — одно число на все уровни, результат в виде таблицы.
- «ЖИЗНИ» — ограниченное здоровье; ошибка = потеря жизни.
- «С подсказками» — раз в N уровней видишь правильный ответ заранее.
- Количество уровней (с защитой от слишком больших значений)
- Здоровье (для режима «ЖИЗНИ»)
- Частота подсказок
- Время выхода из программы (с обратным отсчётом)
- Тип заставки: Альфа / Большая / Базовая
- Автоочистка экрана (вкл/выкл)
- Статистика: победы, ничьи, поражения, количество запусков
- 15 достижений, разделённых на категории:
- Обычные
- Нестандартные
- Редкие
- Ввод
"10"в главном меню → логотип автора + ссылка на игру - Пустой ввод в меню → микро-пасхалка
- Праздничный эвент (пункт
12) — анимированная ёлка с движущимися разноцветными шариками!
Полноценная многоуровневая справка с описанием всех режимов, настроек, ошибок и сохранений.
- Язык: C++17
- Случайность:
std::mt19937+std::random_device - Цвета: ANSI-коды (
white,green,yellow,red,blue,cyan,brown) - Безопасность: валидация ввода, защита от некорректных значений
- Архитектура: модульная, каждый файл отвечает за отдельную подсистему
- Поддержка UTF-8 в консоли Windows
Проект реализован с соблюдением принципов объектно-ориентированного программирования:
CustomBoolArray— динамический массивbool, реализованный вручную (вместоstd::vector<bool>).- Управление памятью инкапсулировано в классе (конструктор/деструктор)
- Инкапсуляция: приватный указатель
bool* data_, публичные методыget(),set() - Запрет копирования через
= deleteдля предотвращения утечек - Соответствует требованию задания: "Реализация структур данных — собственная!"
| Файл | Ответственность |
|---|---|
main.cpp |
Точка входа в приложение |
Engine.h/.cpp |
Класс GameSession: состояние игры, сохранения, достижения |
UI.h/.cpp |
Консольный интерфейс, меню, подразделы меню |
GameMode.h/.cpp |
Базовый класс режимов + 4 режима (Классика, Всё/Ничего, Жизни, Подсказки) |
logos.h |
заставки и логотипы |
- Класс-исключение
GameExitRequestedдля корректного прерывания игры - Валидация ввода через
InputValidator::getInt()с повторным запросом - Защита от некорректных файлов сохранения (автосоздание обычного сохранения)
- Перейдите в раздел Releases.
- Скачайте файл
01_Step.exe - Запустите файл.
💡 При первом запуске автоматически создастся файл
save_data.txt— в нём хранятся ваши настройки, статистика и достижения.
- ОС: Windows
- Компилятор, поддерживающий C++17
- (Опционально) Любая IDE или редактор кода
- Склонируйте репозиторий:
git clone https://github.com/KotLut/01_Step_CPP.git
- Откройте файл
01-Step.slnxв Visual Studio. - Вверху выберите конфигурацию:
Platform: x64 → Configuration: Release - Нажмите «Сборка → Собрать решение» (или
Ctrl+Shift+B). - После сборки запустите игру непосредственно в Visual Studio или из папки:
01-Step\x64\Release\01-Step.exe
💡 Исходный код полностью на русском языке и использует UTF-8. Все файлы сохранены с BOM для корректной работы в Visual Studio.
Этот проект распространяется под лицензией MIT.
Хотите помочь проекту? Ознакомьтесь с нашим руководством по вкладу.
Есть идея, вопрос или просто хотите пообщаться?
Присоединяйтесь к Discussions!
- Основной игровой процесс
- Система сохранения
- Достижения
- Дополнительные игровые режимы
- Улучшения локализации
- Полная поддержка Linux
"Guess what the computer chose: 0 or 1?"
A minimalistic but deep text game with multiple modes, settings, achievements and Easter eggs.
Written in C++ using modern practices and without external dependencies.
2-beta — second public beta version
- Classic — Guess 0/1 on each level.
- "All or nothing" — one number for all levels, the result is in the form of a table.
- "LIFE" — limited health; error = loss of life.
- "With hints" — once in N levels you see the correct answer in advance.
- Number of levels (with protection against too high values)
- Health (for the "LIFE" mode)
- Frequency of prompts
- Program exit time (with countdown)
- Splash screen type: Alpha / Large / Basic
- Auto screen cleaning (on/off)
- Statistics: wins, draws, losses, number of runs
- 15 achievements, divided into categories:
- Common
- Unusual
- Rare
- Enter
"10"in the main menu → author's logo + link to the game - Empty menu entry → micro Easter egg
- Festive event (item
12) — animated Christmas tree with moving colorful balls!
A full-fledged multi-level help with descriptions of all modes, settings, errors, and saves.
- Language: C++17
- Randomness:
std::mt19937+std::random_device - Colors: ANSI codes (
white,green,yellow,red,blue,cyan,brown) - Security: input validation, protection against incorrect values
- Architecture: modular, each file is responsible for a separate subsystem
- UTF-8 support in Windows console
The project was implemented in compliance with the principles of object-oriented programming:
- CustomBoolArray is a manually implemented dynamic
boolarray - Memory management via
new[]/delete[](RAII) - Encapsulation: private pointer
bool* data_, public methodsget(),set() - Prohibition of copying via
= deleteto prevent leaks - Meets the requirement of the assignment: * "The implementation of data structures is proprietary!"*
| File | Responsibility |
|---|---|
main.cpp |
Application Entry point |
Engine.h/.cpp |
'GameSession` class: game status, saves, achievements |
UI.h/.cpp |
Console interface, menus, menu subsections |
GameMode.h/.cpp |
Basic class of modes + 4 modes (Classic, All/Nothing, Life, Hints) |
logos.h |
screensavers and logos |
-The GameExitRequested exception class for correctly interrupting the game
- Input validation via
InputValidator::getInt()with a repeat request - Protection against incorrect save files (auto-create normal save)
- Go to the Releases.
- Download the file
01_Step.exe - Run the file.
💡 The file will be automatically created at the first launch
save_data.txt— It stores your settings, stats, and achievements.
- OS: Windows
- A compiler that supports C++17
- (Optional) Any IDE or code editor
- Clone the repository:
git clone https://github.com/KotLut/01_Step_CPP.git
- Open the
01-Step.slnxfile in Visual Studio. - At the top, select the configuration: Platform: x64 → Configuration: Release
- Click "Build → Assemble Solution" (or
Ctrl+Shift+B). - After the build, run the game directly in Visual Studio or from the folder:
01-Step\x64\Release\01-Step.exe
💡 The source code is entirely in Russian and uses UTF-8. All files are saved from the BOM to work correctly in Visual Studio.
This project is distributed under the MIT.
Do you want to help the project? Check out our contribution guide.
Do you have an idea, a question, or just want to chat?
Join the Discussions!
- Core gameplay
- Save system
- Achievements
- Additional game modes
- Localization improvements
- Linux full support
