Skip to content
This repository has been archived by the owner on Jul 21, 2024. It is now read-only.

Commit

Permalink
version 1.1.0
Browse files Browse the repository at this point in the history
Now the inscription "There was no shot in the previous move" is not displayed on the first move.

The use of color inversion has been reduced because older versions of Windows don't work well with them.

The welcome screen has been changed (when starting the game).

Now the game results screen has become more beautiful.
  • Loading branch information
yarb00 committed Jan 28, 2024
1 parent f0083ce commit 220dac5
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions russian-roulette-plus-plus/russian_roulette_plus_plus.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,17 +9,17 @@ void Russian_roulette_plus_plus::start()

void Russian_roulette_plus_plus::print_title()
{
const std::string version{ "1.0.2" };
const std::string version{ "1.1.0" };

std::cout << "\033[7mRussianRoulette++\033[27m (\033[4mhttps://github.com/yarb00/russian-roulette-plus-plus\033[24m)" << std::endl << "îò yarb00 (\033[4mhttps://github.com/yarb00\033[24m)" << std::endl << std::endl << "v" << version << std::endl << std::endl << "-----" << std::endl << std::endl;
std::cout << "\033[7m| RussianRoulette++ |\033[27m (\033[4m https://github.com/yarb00/russian-roulette-plus-plus \033[24m)" << std::endl << "îò yarb00 (\033[4m https://github.com/yarb00 \033[24m)" << std::endl << std::endl << "v" << version << std::endl << std::endl << "-----" << std::endl << std::endl;
}

void Russian_roulette_plus_plus::menu()
{
system("cls");

this->print_title();
std::cout << "Äîáðî ïîæàëîâàòü!" << std::endl << std::endl << "Íàæìèòå ëþáóþ êíîïêó, ÷òîáû íà÷àòü èãðó...";
std::cout << "Äîáðî ïîæàëîâàòü â ðóññêóþ ðóëåòêó!" << std::endl << std::endl << "----------" << std::endl << "Íàæìèòå ëþáóþ êíîïêó, ÷òîáû íà÷àòü èãðó..." << std::endl << "----------";

system("pause > nul 2>&1");

Expand All @@ -33,7 +33,7 @@ void Russian_roulette_plus_plus::menu()
system("cls");

this->print_title();
std::cout << "Âûáåðèòå ðåæèì èãðû è ââåäèòå åãî íîìåð:" << std::endl << std::endl << "0. Âûéòè èç èãðû" << std::endl << std::endl << "1. 6 õîäîâ (âñåãî 6 ïîïûòîê/âûñòðåëîâ) [\033[7mÊËÀÑÑÈ×ÅÑÊÈÉ\033[27m]" << std::endl << "2. Áåñêîíå÷íûé (ïðîäîëæàåòñÿ, ïîêà êòî-íèáóäü íå ïðîèãðàåò)" << std::endl << "3. 12 õîäîâ (âñåãî 12 ïîïûòîê/âûñòðåëîâ) [\033[7mÐÅÊÎÌÅÍÄÓÅÒÑß\033[27m]" << std::endl << "4. 24 õîäà (âñåãî 24 ïîïûòêè/âûñòðåëà)" << std::endl << std::endl;
std::cout << "Âûáåðèòå ðåæèì èãðû è ââåäèòå åãî íîìåð:" << std::endl << std::endl << "0. Âûéòè èç èãðû" << std::endl << std::endl << "1. 6 õîäîâ (âñåãî 6 ïîïûòîê/âûñòðåëîâ) [ÊËÀÑÑÈ×ÅÑÊÈÉ]" << std::endl << "2. Áåñêîíå÷íûé (ïðîäîëæàåòñÿ, ïîêà êòî-íèáóäü íå ïðîèãðàåò)" << std::endl << "3. 12 õîäîâ (âñåãî 12 ïîïûòîê/âûñòðåëîâ) [ÐÅÊÎÌÅÍÄÓÅÒÑß]" << std::endl << "4. 24 õîäà (âñåãî 24 ïîïûòêè/âûñòðåëà)" << std::endl << std::endl;
std::cout << "Ââåäèòå íîìåð è íàæìèòå Enter |>>> ";
std::cin >> gamemode;

Expand Down Expand Up @@ -103,15 +103,15 @@ void Russian_roulette_plus_plus::game(gamemodes _gamemode)
system("cls");

this->print_title();
std::cout << "Â ïðîøëîì õîäå âûñòðåëà íå ïðîèçîøëî." << std::endl << std::endl;
if (attempts_left != 0) std::cout << "Â ïðîøëîì õîäå âûñòðåëà íå ïðîèçîøëî." << std::endl << std::endl;

if (is_player_move)
{
std::cout << "Ñåé÷àñ \033[7mÂÀØ\033[27m õîä." << std::endl << std::endl << "Íàæìèòå ëþáóþ êíîïêó, ÷òîáû ñäåëàòü ñåáå âûñòðåë...";
std::cout << "Ñåé÷àñ ÂÀØ õîä." << std::endl << std::endl << "Íàæìèòå ëþáóþ êíîïêó, ÷òîáû ñäåëàòü ñåáå âûñòðåë...";
}
else
{
std::cout << "Ñåé÷àñ õîä \033[7mÏÐÎÒÈÂÍÈÊÀ\033[27m." << std::endl << std::endl << "Íàæìèòå ëþáóþ êíîïêó, ÷òîáû ñäåëàòü â íåãî âûñòðåë...";
std::cout << "Ñåé÷àñ õîä ÏÐÎÒÈÂÍÈÊÀ." << std::endl << std::endl << "Íàæìèòå ëþáóþ êíîïêó, ÷òîáû ñäåëàòü â íåãî âûñòðåë...";
}

system("pause > nul 2>&1");
Expand Down Expand Up @@ -154,16 +154,16 @@ void Russian_roulette_plus_plus::game(gamemodes _gamemode)
system("cls");

this->print_title();
std::cout << "Â ïðîøëîì õîäå âûñòðåëà íå ïðîèçîøëî." << std::endl << std::endl;
std::cout << "Îñòàëîñü \033[7m" << attempts_left << "\033[27m õîäîâ." << std::endl << std::endl;
if (attempts_left - real_attempts != 0) std::cout << "Â ïðîøëîì õîäå âûñòðåëà íå ïðîèçîøëî." << std::endl << std::endl;
std::cout << "Îñòàëîñü " << attempts_left << " õîäîâ." << std::endl << std::endl;

if (is_player_move)
{
std::cout << "Ñåé÷àñ \033[7mÂÀØ\033[27m õîä." << std::endl << std::endl << "Íàæìèòå ëþáóþ êíîïêó, ÷òîáû ñäåëàòü ñåáå âûñòðåë...";
std::cout << "Ñåé÷àñ ÂÀØ õîä." << std::endl << std::endl << "Íàæìèòå ëþáóþ êíîïêó, ÷òîáû ñäåëàòü ñåáå âûñòðåë...";
}
else
{
std::cout << "Ñåé÷àñ õîä \033[7mÏÐÎÒÈÂÍÈÊÀ\033[27m." << std::endl << std::endl << "Íàæìèòå ëþáóþ êíîïêó, ÷òîáû ñäåëàòü â íåãî âûñòðåë...";
std::cout << "Ñåé÷àñ õîä ÏÐÎÒÈÂÍÈÊÀ." << std::endl << std::endl << "Íàæìèòå ëþáóþ êíîïêó, ÷òîáû ñäåëàòü â íåãî âûñòðåë...";
}

system("pause > nul 2>&1");
Expand All @@ -178,21 +178,21 @@ void Russian_roulette_plus_plus::game(gamemodes _gamemode)
{
system("color 8f");

std::cout << "\033[7mÍÈ×Üß\033[27m" << std::endl << std::endl;
std::cout << "\033[7m \\\\ ! ÍÈ×Üß ! // \033[27m" << std::endl << std::endl;
std::cout << "Âñå õîäû èñ÷åðïàíû, è ïóëÿ òàê è íå ïîïàëàñü íè îäíîìó èç âàñ. Íèêòî íå âûèãðàë." << std::endl << std::endl;
}
else if (game_result == game_results::PLAYER_WIN)
{
system("color 2f");

std::cout << "\033[7mÏÎÁÅÄÀ\033[27m" << std::endl << std::endl;
std::cout << "\033[7m \\\\ ! ÏÎÁÅÄÀ ! // \033[27m" << std::endl << std::endl;
std::cout << "Âàø îïïîíåíò óìåð. Âû ïîáåäèëè!" << std::endl << std::endl;
}
else if (game_result == game_results::OPPONENT_WIN)
{
system("color 4f");

std::cout << "\033[7mÏÎÐÀÆÅÍÈÅ\033[27m" << std::endl << std::endl;
std::cout << "\033[7m \\\\ ! ÏÎÐÀÆÅÍÈÅ ! // \033[27m" << std::endl << std::endl;
std::cout << "Âû óìåðëè. Âàø îïïîíåíò ïîáåäèë!" << std::endl << std::endl;
}

Expand Down

0 comments on commit 220dac5

Please sign in to comment.