#include <bits/stdc++.h>
#include <conio.h>
#include <windows.h>
#include <dos.h>
int vKey = 0;
int idxnum = 1;
//don't edit
std::string writer_ = "tang yu han";
std::string art_writer_ = "tang yu han";
std::string time_ = "2024/12/29 10:29";
std::string version_ = "version 2.9.5";
std::string change_ = "-one new path";
//don't edit
using namespace std;
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
bool Cursor = false;
HANDLE console = GetStdHandle(STD_OUTPUT_HANDLE);
COORD CursorPosition;
void goto_xy(int x, int y){
CursorPosition.X = x;
CursorPosition.Y = y;
SetConsoleCursorPosition(console, CursorPosition);
}
string password = "871127";
int dx[3]={1, -1, 0};
int dy[3]={-1, 1, 0};
/* 000000000011111111112222*/
/* 012345678901234567890123*/
char maps1[100][100] = {/*0*/"************************",
/*1*/"*** ***",
/*2*/"*** ***",
/*3*/"*** //*",
/*4*/"***= f/|*",
/*5*/"********RR*****RR*******"};
/* 000000000011111111112222*/
/* 012345678901234567890123*/
char maps2[100][100] = {/*0*/"************************",
/*1*/"*** ***",
/*2*/"*** //*",
/*3*/"***= /|*",
/*4*/"*******RR***RR***** ***",
/*5*/"*** ***",
/*6*/"*** ***",
/*7*/"***f ***",
/*8*/"********RR*****RR*******"};
char maps3[100][100] = {"************************",
"*// ***",
"*|/ ***",
"*** ***",
"***= f***",
"********RRRRR***********"};
char maps4[100][100] = {"************************",
"*** ***",
"*** ***",
"***= ***",
"*******RRRR******** ***",
"*** ***",
"*// ***",
"*/|f ***",
"********RRRRR***********"};
char maps5[100][100] = {"************************",
"*** ***",
"*** f ***",
"*** ***** ***",
"*** ***",
"*** ***** ***",
"*** //*",
"*** =***** /|*",
"************************"};
char maps6[100][100] = {"*************************",
"*** ***",
"*** ***",
"*** ******",
"*** * ***",
"***= * f***",
"*************************"};
char maps6_2[100][100] = {"*************************",
"*** ***",
"*** ***",
"*** ***",
"*** ***",
"***= f***",
"*************************"};
char maps7[100][100] = {"*************************",
"*** ***",
"*** ***",
"*** ***",
"*** ***",
"***= ***",
"*************************"};
enum ConsoleColor {
BLACK = 0,
BLUE = 1,
GREEN = 2,
CYAN = 3,
RED = 4,
MAGENTA = 5,
BROWN = 6,
LIGHT_GRAY = 7,
DARK_GRAY = 8,
LIGHT_BLUE = 9,
LIGHT_GREEN = 10,
LIGHT_CYAN = 11,
LIGHT_RED = 12,
LIGHT_MAGENTA = 13,
YELLOW = 14,
WHITE = 15
};
void SetConsoleColor(ConsoleColor color) {
HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
SetConsoleTextAttribute(hConsole, color);
}
bool play_1(){
int x = 0, y = 0;
for(int i = 0; i < 6; i++){
int n = strlen(maps1[i]);
for(int j = 0; j < n; j++){
if(maps1[i][j] == '='){
x = i, y = j;
break;
}
}
}
{
int up = 0;
int index = 0;
int indexx = 1;
int indexy = 4;
system("cls");
SetConsoleColor(WHITE);
for(int i = 0; i < 6; i++){
int n = strlen(maps1[i]);
for(int j = 0; j < n; j++){
if(j < n){
if(maps1[i][j] == 'R'){
SetConsoleColor(RED);
cout << "█";
}else if(maps1[i][j] == 'f'){
SetConsoleColor(GREEN);
cout << "█";
}
else if(maps1[i][j] == '*'){
SetConsoleColor(YELLOW);
cout << "█";
}
else if(maps1[i][j] == ' '){
cout << " ";
}
else if(maps1[i][j] == '='){
SetConsoleColor(WHITE);
cout << "█";
}else if(maps1[i][j] == '/'){//changes1 start
SetConsoleColor(YELLOW);
cout << "█";
}//changes1 end
else{
SetConsoleColor(YELLOW);
cout << "█";
}
}
}cout << '\n';
}
while(1){
if(KEY_DOWN(27)){
return false;
}
if(maps1[x + 1][y] != '*' && maps1[x - 1][y] != '-' && up == 0 && maps1[x - 1][y] != 'R'){
if(maps1[x + 1][y] == 'f'){
system("cls");
break;
}
int fc = 0;
bool fl = 1;
for(int i = 1; i <= indexx; i++){
if(maps1[x + i][y] != '*' && maps1[x + i][y] != 'f'){
if(maps1[x + i][y] == 'R'){
system("cls");
bool k = play_1();
system("cls");
return k;
}else if(maps1[x + i][y] == '/'){
maps1[x + i][y] = ' ';
}else if(maps1[x + i][y] == '|'){
maps1[x + i][y] = ' ';
vKey++;
}
fc++;
}else{
break;
}
}if(fl){
if(fc == indexx){
goto_xy(y, x);
cout << " ";
x += indexx;
indexx *= 2;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
indexx = 1;
goto_xy(y, x);
cout << " ";
x += fc;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
}
}else if(maps1[x + 1][y] == 'R'){
system("cls");
bool k = play_1();
system("cls");
return k;
}
if(up == 1 && index <= 0 && maps1[x - 1][y] != '*' && maps1[x - 1][y] != 'f'){
goto_xy(y, x);
cout << " ";
indexy /= 2;
int fc = 0;
for(int i = 1; i <= indexy; i++){
if(maps1[x - i][y] != '*' && maps1[x - i][y] != 'f'){
fc++;
}else{
break;
}
}
if(fc < indexy){
x -= fc;
up = 0;
indexy = 4;
index = 0;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
x -= indexy;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
index++;
}else if(maps1[x - 1][y] == 'f'){
break;
}else{
indexy = 4;
up = 0, index = 0;
}
// if(y == 9 && !numck){
// maps1[5][10] = 'R';
// maps1[5][11] = 'R';
// goto_xy(10, 5);
// SetConsoleColor(RED);
// cout << "█";
// goto_xy(11, 5);
// SetConsoleColor(RED);
// cout << "█";
// numck = 1;
// }
Sleep(70);
if(KEY_DOWN(87) && maps1[x + 1][y] == '*'){
up = 1;
}
if(KEY_DOWN(65) && y > 0 && maps1[x][y - 1] != '*' && maps1[x][y - 1] != '-'){
if(maps1[x][y - 1] == 'f'){
break;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps1[x][y - i] != '*' && maps1[x][y - i] != 'f' && maps1[x][y - i] != 'R'){
if(maps1[x][y - i] == '|'){
maps1[x][y - i]='/';
}else if(maps1[x][y - 1] == '/'){
maps1[x][y - i]='/';
}
index++;
}else{
if(maps1[x][y - i] == 'f'){
system("cls");
return true;
}else if(maps1[x][y - i] == 'R'){
system("cls");
bool k = play_1();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y -= index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
if(maps1[x][y - 1] == '|'){
vKey++;
maps1[x][y - 1] = '/';
}
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y--;
goto_xy(y, x);
cout << "█";
}
}
if(KEY_DOWN(68) && maps1[x][y + 1] != '*' && maps1[x][y - 1] != '-'){
if(maps1[x][y + 1] == 'f'){
return true;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps1[x][y + i] != '*' && maps1[x][y + i] != 'f' && maps1[x][y + i] != 'R'){
if(maps1[x][y - i] == '|'){
maps1[x][y - i]='/';
}else if(maps1[x][y - 1] == '/'){
maps1[x][y - i]='/';
}
index++;
}else{
if(maps1[x][y + i] == 'f'){
system("cls");
return true;
}else if(maps1[x][y + i] == 'R'){
system("cls");
bool k = play_1();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y += index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
if(maps1[x][y - 1] == '|'){
vKey++;
maps1[x][y - 1] = '/';
}
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y++;
goto_xy(y, x);
cout << "█";
}
}
}
}
return true;
}
bool play_2(){
int x = 0, y = 0;
for(int i = 0; i < 9; i++){
int n = strlen(maps2[i]);
for(int j = 0; j < n; j++){
if(maps2[i][j] == '='){
x = i, y = j;
break;
}
}
}
{
int up = 0;
int index = 0;
int indexx = 1;
int indexy = 4;
system("cls");
SetConsoleColor(WHITE);
for(int i = 0; i < 9; i++){
int n = strlen(maps2[i]);
for(int j = 0; j < n; j++){
if(j < n){
if(maps2[i][j] == 'R'){
SetConsoleColor(RED);
cout << "█";
}else if(maps2[i][j] == 'f'){
SetConsoleColor(GREEN);
cout << "█";
}
else if(maps2[i][j] == '*'){
SetConsoleColor(YELLOW);
cout << "█";
}
else if(maps2[i][j] == ' '){
cout << " ";
}
else if(maps2[i][j] == '='){
SetConsoleColor(WHITE);
cout << "█";
}else if(maps2[i][j] == '/'){//changes1 start
SetConsoleColor(YELLOW);
cout << "█";
}//changes1 end
else{
SetConsoleColor(YELLOW);
cout << "█";
}
}
}cout << '\n';
}
while(1){
if(KEY_DOWN(27)){
return false;
}
if(maps2[x + 1][y] != '*' && maps2[x - 1][y] != '-' && up == 0 && maps2[x - 1][y] != 'R'){
if(maps2[x + 1][y] == 'f'){
system("cls");
break;
}
int fc = 0;
bool fl = 1;
for(int i = 1; i <= indexx; i++){
if(maps2[x + i][y] != '*' && maps2[x + i][y] != 'f'){
if(maps2[x + i][y] == 'R'){
system("cls");
bool k = play_2();
system("cls");
return k;
}else if(maps2[x + i][y] == '/'){
maps2[x + i][y] = ' ';
}else if(maps2[x + i][y] == '|'){
maps2[x + i][y] = ' ';
vKey++;
}
fc++;
}else{
break;
}
}if(fl){
if(fc == indexx){
goto_xy(y, x);
cout << " ";
x += indexx;
indexx *= 2;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
indexx = 1;
goto_xy(y, x);
cout << " ";
x += fc;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
}
}else if(maps2[x + 1][y] == 'R'){
system("cls");
bool k = play_2();
system("cls");
return k;
}
if(up == 1 && index <= 0 && maps2[x - 1][y] != '*' && maps2[x - 1][y] != 'f'){
goto_xy(y, x);
cout << " ";
indexy /= 2;
int fc = 0;
for(int i = 1; i <= indexy; i++){
if(maps2[x - i][y] != '*' && maps2[x - i][y] != 'f'){
fc++;
}else{
break;
}
}
if(fc < indexy){
x -= fc;
up = 0;
indexy = 4;
index = 0;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
x -= indexy;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
index++;
}else if(maps2[x - 1][y] == 'f'){
break;
}else{
indexy = 4;
up = 0, index = 0;
}
// if(y == 9 && !numck){
// maps2[5][10] = 'R';
// maps2[5][11] = 'R';
// goto_xy(10, 5);
// SetConsoleColor(RED);
// cout << "█";
// goto_xy(11, 5);
// SetConsoleColor(RED);
// cout << "█";
// numck = 1;
// }
Sleep(70);
if(KEY_DOWN(87) && maps2[x + 1][y] == '*'){
up = 1;
}
if(KEY_DOWN(65) && y > 0 && maps2[x][y - 1] != '*' && maps2[x][y - 1] != '-'){
if(maps2[x][y - 1] == 'f'){
break;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps2[x][y - i] != '*' && maps2[x][y - i] != 'f' && maps2[x][y - i] != 'R'){
if(maps2[x][y - i] == '|'){
maps2[x][y - i]='/';
}else if(maps2[x][y - 1] == '/'){
maps2[x][y - i]='/';
}
index++;
}else{
if(maps2[x][y - i] == 'f'){
system("cls");
return true;
}else if(maps2[x][y - i] == 'R'){
system("cls");
bool k = play_2();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y -= index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
if(maps2[x][y - 1] == '|'){
vKey++;
maps2[x][y - 1] = '/';
}
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y--;
goto_xy(y, x);
cout << "█";
}
}
if(KEY_DOWN(68) && maps2[x][y + 1] != '*' && maps2[x][y - 1] != '-'){
if(maps2[x][y + 1] == 'f'){
return true;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps2[x][y + i] != '*' && maps2[x][y + i] != 'f' && maps2[x][y + i] != 'R'){
if(maps2[x][y - i] == '|'){
maps2[x][y - i]='/';
}else if(maps2[x][y - 1] == '/'){
maps2[x][y - i]='/';
}
index++;
}else{
if(maps2[x][y + i] == 'f'){
system("cls");
return true;
}else if(maps2[x][y + i] == 'R'){
system("cls");
bool k = play_2();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y += index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
if(maps2[x][y - 1] == '|'){
vKey++;
maps2[x][y - 1] = '/';
}
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y++;
goto_xy(y, x);
cout << "█";
}
}
}
}
return true;
}
bool play_3(){
int x = 0, y = 0;
for(int i = 0; i < 6; i++){
int n = strlen(maps3[i]);
for(int j = 0; j < n; j++){
if(maps3[i][j] == '='){
x = i, y = j;
break;
}
}
}
{
int up = 0;
int index = 0;
int indexx = 1;
int indexy = 4;
system("cls");
SetConsoleColor(WHITE);
for(int i = 0; i < 6; i++){
int n = strlen(maps3[i]);
for(int j = 0; j < n; j++){
if(j < n){
if(maps3[i][j] == 'R'){
SetConsoleColor(RED);
cout << "█";
}else if(maps3[i][j] == 'f'){
SetConsoleColor(GREEN);
cout << "█";
}
else if(maps3[i][j] == '*'){
SetConsoleColor(YELLOW);
cout << "█";
}
else if(maps3[i][j] == ' '){
cout << " ";
}
else if(maps3[i][j] == '='){
SetConsoleColor(WHITE);
cout << "█";
}else if(maps3[i][j] == '/'){//changes1 start
SetConsoleColor(YELLOW);
cout << "█";
}//changes1 end
else{
SetConsoleColor(YELLOW);
cout << "█";
}
}
}cout << '\n';
}
while(1){
if(KEY_DOWN(27)){
return false;
}
if(maps3[x + 1][y] != '*' && maps3[x - 1][y] != '-' && up == 0 && maps3[x - 1][y] != 'R'){
if(maps3[x + 1][y] == 'f'){
system("cls");
break;
}
int fc = 0;
bool fl = 1;
for(int i = 1; i <= indexx; i++){
if(maps3[x + i][y] != '*' && maps3[x + i][y] != 'f'){
if(maps3[x + i][y] == 'R'){
system("cls");
bool k = play_3();
system("cls");
return k;
}else if(maps3[x + i][y] == '/'){
maps3[x + i][y] = ' ';
}else if(maps3[x + i][y] == '|'){
maps3[x + i][y] = ' ';
vKey++;
}
fc++;
}else{
break;
}
}if(fl){
if(fc == indexx){
goto_xy(y, x);
cout << " ";
x += indexx;
indexx *= 2;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
indexx = 1;
goto_xy(y, x);
cout << " ";
x += fc;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
}
}else if(maps3[x + 1][y] == 'R'){
system("cls");
bool k = play_3();
system("cls");
return k;
}
if(up == 1 && index <= 0 && maps3[x - 1][y] != '*' && maps3[x - 1][y] != 'f'){
goto_xy(y, x);
cout << " ";
indexy /= 2;
int fc = 0;
for(int i = 1; i <= indexy; i++){
if(maps3[x - i][y] != '*' && maps3[x - i][y] != 'f'){
fc++;
}else{
break;
}
}
if(fc < indexy){
x -= fc;
up = 0;
indexy = 4;
index = 0;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
x -= indexy;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
index++;
}else if(maps3[x - 1][y] == 'f'){
break;
}else{
indexy = 4;
up = 0, index = 0;
}
// if(y == 9 && !numck){
// maps3[5][10] = 'R';
// maps3[5][11] = 'R';
// goto_xy(10, 5);
// SetConsoleColor(RED);
// cout << "█";
// goto_xy(11, 5);
// SetConsoleColor(RED);
// cout << "█";
// numck = 1;
// }
Sleep(70);
if(KEY_DOWN(87) && maps3[x + 1][y] == '*'){
up = 1;
}
if(KEY_DOWN(65) && y > 0 && maps3[x][y - 1] != '*' && maps3[x][y - 1] != '-'){
if(maps3[x][y - 1] == 'f'){
break;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps3[x][y - i] != '*' && maps3[x][y - i] != 'f' && maps3[x][y - i] != 'R'){
if(maps3[x][y - i] == '|'){
maps3[x][y - i]='/';
}else if(maps3[x][y - 1] == '/'){
maps3[x][y - i]='/';
}
index++;
}else{
if(maps3[x][y - i] == 'f'){
system("cls");
return true;
}else if(maps3[x][y - i] == 'R'){
system("cls");
bool k = play_3();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y -= index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
if(maps3[x][y - 1] == '|'){
vKey++;
maps3[x][y - 1] = '/';
}
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y--;
goto_xy(y, x);
cout << "█";
}
}
if(KEY_DOWN(68) && maps3[x][y + 1] != '*' && maps3[x][y - 1] != '-'){
if(maps3[x][y + 1] == 'f'){
return true;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps3[x][y + i] != '*' && maps3[x][y + i] != 'f' && maps3[x][y + i] != 'R'){
if(maps3[x][y - i] == '|'){
maps3[x][y - i]='/';
}else if(maps3[x][y - 1] == '/'){
maps3[x][y - i]='/';
}
index++;
}else{
if(maps3[x][y + i] == 'f'){
system("cls");
return true;
}else if(maps3[x][y + i] == 'R'){
system("cls");
bool k = play_3();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y += index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
if(maps3[x][y - 1] == '|'){
vKey++;
maps3[x][y - 1] = '/';
}
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y++;
goto_xy(y, x);
cout << "█";
}
}
}
}
return true;
}
bool play_4(){
int x = 0, y = 0;
for(int i = 0; i < 9; i++){
int n = strlen(maps4[i]);
for(int j = 0; j < n; j++){
if(maps4[i][j] == '='){
x = i, y = j;
break;
}
}
}
{
int up = 0;
int index = 0;
int indexx = 1;
int indexy = 4;
system("cls");
SetConsoleColor(WHITE);
for(int i = 0; i < 9; i++){
int n = strlen(maps4[i]);
for(int j = 0; j < n; j++){
if(j < n){
if(maps4[i][j] == 'R'){
SetConsoleColor(RED);
cout << "█";
}else if(maps4[i][j] == 'f'){
SetConsoleColor(GREEN);
cout << "█";
}
else if(maps4[i][j] == '*'){
SetConsoleColor(YELLOW);
cout << "█";
}
else if(maps4[i][j] == ' '){
cout << " ";
}
else if(maps4[i][j] == '='){
SetConsoleColor(WHITE);
cout << "█";
}else if(maps4[i][j] == '/'){//changes1 start
SetConsoleColor(YELLOW);
cout << "█";
}//changes1 end
else{
SetConsoleColor(YELLOW);
cout << "█";
}
}
}cout << '\n';
}
while(1){
if(KEY_DOWN(27)){
return false;
}
if(maps4[x + 1][y] != '*' && maps4[x - 1][y] != '-' && up == 0 && maps4[x - 1][y] != 'R'){
if(maps4[x + 1][y] == 'f'){
system("cls");
break;
}
int fc = 0;
bool fl = 1;
for(int i = 1; i <= indexx; i++){
if(maps4[x + i][y] != '*' && maps4[x + i][y] != 'f'){
if(maps4[x + i][y] == 'R'){
system("cls");
bool k = play_4();
system("cls");
return k;
}else if(maps4[x + i][y] == '/'){
maps4[x + i][y] = ' ';
}else if(maps4[x + i][y] == '|'){
maps4[x + i][y] = ' ';
vKey++;
}
fc++;
}else{
break;
}
}if(fl){
if(fc == indexx){
goto_xy(y, x);
cout << " ";
x += indexx;
indexx *= 2;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
indexx = 1;
goto_xy(y, x);
cout << " ";
x += fc;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
}
}else if(maps4[x + 1][y] == 'R'){
system("cls");
bool k = play_4();
system("cls");
return k;
}
if(up == 1 && index <= 0 && maps4[x - 1][y] != '*' && maps4[x - 1][y] != 'f'){
goto_xy(y, x);
cout << " ";
indexy /= 2;
int fc = 0;
for(int i = 1; i <= indexy; i++){
if(maps4[x - i][y] != '*' && maps4[x - i][y] != 'f'){
fc++;
}else{
break;
}
}
if(fc < indexy){
x -= fc;
up = 0;
indexy = 4;
index = 0;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
x -= indexy;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
index++;
}else if(maps4[x - 1][y] == 'f'){
break;
}else{
indexy = 4;
up = 0, index = 0;
}
// if(y == 9 && !numck){
// maps4[5][10] = 'R';
// maps4[5][11] = 'R';
// goto_xy(10, 5);
// SetConsoleColor(RED);
// cout << "█";
// goto_xy(11, 5);
// SetConsoleColor(RED);
// cout << "█";
// numck = 1;
// }
Sleep(70);
if(KEY_DOWN(87) && maps4[x + 1][y] == '*'){
up = 1;
}
if(KEY_DOWN(65) && y > 0 && maps4[x][y - 1] != '*' && maps4[x][y - 1] != '-'){
if(maps4[x][y - 1] == 'f'){
break;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps4[x][y - i] != '*' && maps4[x][y - i] != 'f' && maps4[x][y - i] != 'R'){
if(maps4[x][y - i] == '|'){
maps4[x][y - i]='/';
}else if(maps4[x][y - 1] == '/'){
maps4[x][y - i]='/';
}
index++;
}else{
if(maps4[x][y - i] == 'f'){
system("cls");
return true;
}else if(maps4[x][y - i] == 'R'){
system("cls");
bool k = play_4();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y -= index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
if(maps4[x][y - 1] == '|'){
vKey++;
maps4[x][y - 1] = '/';
}
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y--;
goto_xy(y, x);
cout << "█";
}
}
if(KEY_DOWN(68) && maps4[x][y + 1] != '*' && maps4[x][y - 1] != '-'){
if(maps4[x][y + 1] == 'f'){
return true;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps4[x][y + i] != '*' && maps4[x][y + i] != 'f' && maps4[x][y + i] != 'R'){
if(maps4[x][y - i] == '|'){
maps4[x][y - i]='/';
}else if(maps4[x][y - 1] == '/'){
maps4[x][y - i]='/';
}
index++;
}else{
if(maps4[x][y + i] == 'f'){
system("cls");
return true;
}else if(maps4[x][y + i] == 'R'){
system("cls");
bool k = play_4();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y += index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
if(maps4[x][y - 1] == '|'){
vKey++;
maps4[x][y - 1] = '/';
}
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y++;
goto_xy(y, x);
cout << "█";
}
}
}
}
return true;
}
bool play_5(){
int x = 0, y = 0;
for(int i = 0; i < 9; i++){
int n = strlen(maps5[i]);
for(int j = 0; j < n; j++){
if(maps5[i][j] == '='){
x = i, y = j;
break;
}
}
}
{
int up = 0;
int index = 0;
int indexx = 1;
int indexy = 4;
system("cls");
SetConsoleColor(WHITE);
for(int i = 0; i < 9; i++){
int n = strlen(maps5[i]);
for(int j = 0; j < n; j++){
if(j < n){
if(maps5[i][j] == 'R'){
SetConsoleColor(RED);
cout << "█";
}else if(maps5[i][j] == 'f'){
SetConsoleColor(GREEN);
cout << "█";
}
else if(maps5[i][j] == '*'){
SetConsoleColor(YELLOW);
cout << "█";
}
else if(maps5[i][j] == ' '){
cout << " ";
}
else if(maps5[i][j] == '='){
SetConsoleColor(WHITE);
cout << "█";
}else if(maps5[i][j] == '/'){//changes1 start
SetConsoleColor(YELLOW);
cout << "█";
}//changes1 end
else{
SetConsoleColor(YELLOW);
cout << "█";
}
}
}cout << '\n';
}
while(1){
if(KEY_DOWN(27)){
return false;
}
if(maps5[x + 1][y] != '*' && maps5[x - 1][y] != '-' && up == 0 && maps5[x - 1][y] != 'R'){
if(maps5[x + 1][y] == 'f'){
system("cls");
break;
}
int fc = 0;
bool fl = 1;
for(int i = 1; i <= indexx; i++){
if(maps5[x + i][y] != '*' && maps5[x + i][y] != 'f'){
if(maps5[x + i][y] == 'R'){
system("cls");
bool k = play_5();
system("cls");
return k;
}else if(maps5[x + i][y] == '/'){
maps5[x + i][y] = ' ';
}else if(maps5[x + i][y] == '|'){
maps5[x + i][y] = ' ';
vKey++;
}
fc++;
}else{
break;
}
}if(fl){
if(fc == indexx){
goto_xy(y, x);
cout << " ";
x += indexx;
indexx *= 2;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
indexx = 1;
goto_xy(y, x);
cout << " ";
x += fc;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
}
}else if(maps5[x + 1][y] == 'R'){
system("cls");
bool k = play_5();
system("cls");
return k;
}
if(up == 1 && index <= 0 && maps5[x - 1][y] != '*' && maps5[x - 1][y] != 'f'){
goto_xy(y, x);
cout << " ";
indexy /= 2;
int fc = 0;
for(int i = 1; i <= indexy; i++){
if(maps5[x - i][y] != '*' && maps5[x - i][y] != 'f'){
fc++;
}else{
break;
}
}
if(fc < indexy){
x -= fc;
up = 0;
indexy = 4;
index = 0;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
x -= indexy;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
index++;
}else if(maps5[x - 1][y] == 'f'){
break;
}else{
indexy = 4;
up = 0, index = 0;
}
// if(y == 9 && !numck){
// maps5[5][10] = 'R';
// maps5[5][11] = 'R';
// goto_xy(10, 5);
// SetConsoleColor(RED);
// cout << "█";
// goto_xy(11, 5);
// SetConsoleColor(RED);
// cout << "█";
// numck = 1;
// }
Sleep(70);
if(KEY_DOWN(87) && maps5[x + 1][y] == '*'){
up = 1;
}
if(KEY_DOWN(65) && y > 0 && maps5[x][y - 1] != '*' && maps5[x][y - 1] != '-'){
if(maps5[x][y - 1] == 'f'){
break;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps5[x][y - i] != '*' && maps5[x][y - i] != 'f' && maps5[x][y - i] != 'R'){
if(maps5[x][y - i] == '|'){
maps5[x][y - i]='/';
}else if(maps5[x][y - 1] == '/'){
maps5[x][y - i]='/';
}
index++;
}else{
if(maps5[x][y - i] == 'f'){
system("cls");
return true;
}else if(maps5[x][y - i] == 'R'){
system("cls");
bool k = play_5();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y -= index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
if(maps5[x][y - 1] == '|'){
vKey++;
maps5[x][y - 1] = '/';
}
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y--;
goto_xy(y, x);
cout << "█";
}
}
if(KEY_DOWN(68) && maps5[x][y + 1] != '*' && maps5[x][y - 1] != '-'){
if(maps5[x][y + 1] == 'f'){
return true;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps5[x][y + i] != '*' && maps5[x][y + i] != 'f' && maps5[x][y + i] != 'R'){
if(maps5[x][y - i] == '|'){
maps5[x][y - i]='/';
}else if(maps5[x][y - 1] == '/'){
maps5[x][y - i]='/';
}
index++;
}else{
if(maps5[x][y + i] == 'f'){
system("cls");
return true;
}else if(maps5[x][y + i] == 'R'){
system("cls");
bool k = play_5();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y += index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
if(maps5[x][y - 1] == '|'){
vKey++;
maps5[x][y - 1] = '/';
}
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y++;
goto_xy(y, x);
cout << "█";
}
}
}
}
return true;
}
bool play_6(){
int x = 0, y = 0;
for(int i = 0; i < 7; i++){
int n = strlen(maps6[i]);
for(int j = 0; j < n; j++){
if(maps6[i][j] == '='){
x = i, y = j;
break;
}
}
}
{
int up = 0;
int index = 0;
int indexx = 1;
int indexy = 4;
system("cls");
SetConsoleColor(WHITE);
for(int i = 0; i < 7; i++){
int n = strlen(maps6[i]);
for(int j = 0; j < n; j++){
if(j < n){
if(maps6[i][j] == 'R'){
SetConsoleColor(RED);
cout << "█";
}else if(maps6[i][j] == 'f'){
SetConsoleColor(GREEN);
cout << "█";
}
else if(maps6[i][j] == '*'){
SetConsoleColor(YELLOW);
cout << "█";
}
else if(maps6[i][j] == ' '){
cout << " ";
}
else if(maps6[i][j] == '='){
SetConsoleColor(WHITE);
cout << "█";
}
}
}cout << '\n';
}
while(1){
if(KEY_DOWN(27)){
return false;
}
if(maps6[x + 1][y] != '*' && maps6[x - 1][y] != '-' && up == 0 && maps6[x - 1][y] != 'R'){
if(maps6[x + 1][y] == 'f'){
system("cls");
break;
}
int fc = 0;
bool fl = 1;
for(int i = 1; i <= indexx; i++){
if(maps6[x + i][y] != '*' && maps6[x + i][y] != 'f'){
if(maps6[x + i][y] == 'R'){
system("cls");
bool k = play_6();
system("cls");
return k;
}
fc++;
}else{
break;
}
}if(fl){
if(fc == indexx){
goto_xy(y, x);
cout << " ";
x += indexx;
indexx *= 2;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
indexx = 1;
goto_xy(y, x);
cout << " ";
x += fc;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
}
}else if(maps6[x + 1][y] == 'R'){
system("cls");
bool k = play_6();
system("cls");
return k;
}
if(up == 1 && index <= 0 && maps6[x - 1][y] != '*' && maps6[x - 1][y] != 'f'){
goto_xy(y, x);
cout << " ";
indexy /= 2;
int fc = 0;
for(int i = 1; i <= indexy; i++){
if(maps6[x - i][y] != '*' && maps6[x - i][y] != 'f'){
fc++;
}else{
break;
}
}
if(fc < indexy){
x -= fc;
up = 0;
indexy = 4;
index = 0;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
x -= indexy;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
index++;
}else if(maps6[x - 1][y] == 'f'){
break;
}else{
indexy = 4;
up = 0, index = 0;
}
// if(y == 9 && !numck){
// maps6[5][10] = 'R';
// maps6[5][11] = 'R';
// goto_xy(10, 5);
// SetConsoleColor(RED);
// cout << "█";
// goto_xy(11, 5);
// SetConsoleColor(RED);
// cout << "█";
// numck = 1;
// }
Sleep(70);
if(KEY_DOWN(87) && maps6[x + 1][y] == '*'){
up = 1;
}
if(KEY_DOWN(65) && y > 0 && maps6[x][y - 1] != '*' && maps6[x][y - 1] != '-'){
if(maps6[x][y - 1] == 'f'){
break;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps6[x][y - i] != '*' && maps6[x][y - i] != 'f' && maps6[x][y - i] != 'R'){
index++;
}else{
if(maps6[x][y - i] == 'f'){
system("cls");
return true;
}else if(maps6[x][y - i] == 'R'){
system("cls");
bool k = play_6();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y -= index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y--;
goto_xy(y, x);
cout << "█";
}
}
if(KEY_DOWN(68) && maps6[x][y + 1] != '*' && maps6[x][y - 1] != '-'){
if(maps6[x][y + 1] == 'f'){
return true;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps6[x][y + i] != '*' && maps6[x][y + i] != 'f' && maps6[x][y + i] != 'R'){
index++;
}else{
if(maps6[x][y + i] == 'f'){
system("cls");
return true;
}else if(maps6[x][y + i] == 'R'){
system("cls");
bool k = play_6();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y += index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y++;
goto_xy(y, x);
cout << "█";
}
}
}
}
return true;
}
bool play_6_2(){
int x = 0, y = 0;
for(int i = 0; i < 7; i++){
int n = strlen(maps6_2[i]);
for(int j = 0; j < n; j++){
if(maps6_2[i][j] == '='){
x = i, y = j;
break;
}
}
}
{
int up = 0;
int index = 0;
int indexx = 1;
int indexy = 4;
system("cls");
SetConsoleColor(WHITE);
for(int i = 0; i < 7; i++){
int n = strlen(maps6_2[i]);
for(int j = 0; j < n; j++){
if(j < n){
if(maps6_2[i][j] == 'R'){
SetConsoleColor(RED);
cout << "█";
}else if(maps6_2[i][j] == 'f'){
SetConsoleColor(GREEN);
cout << "█";
}
else if(maps6_2[i][j] == '*'){
SetConsoleColor(YELLOW);
cout << "█";
}
else if(maps6_2[i][j] == ' '){
cout << " ";
}
else if(maps6_2[i][j] == '='){
SetConsoleColor(WHITE);
cout << "█";
}
}
}cout << '\n';
}
while(1){
if(KEY_DOWN(27)){
return false;
}
if(maps6_2[x + 1][y] != '*' && maps6_2[x - 1][y] != '-' && up == 0 && maps6_2[x - 1][y] != 'R'){
if(maps6_2[x + 1][y] == 'f'){
system("cls");
break;
}
int fc = 0;
bool fl = 1;
for(int i = 1; i <= indexx; i++){
if(maps6_2[x + i][y] != '*' && maps6_2[x + i][y] != 'f'){
if(maps6_2[x + i][y] == 'R'){
system("cls");
bool k = play_6_2();
system("cls");
return k;
}
fc++;
}else{
break;
}
}if(fl){
if(fc == indexx){
goto_xy(y, x);
cout << " ";
x += indexx;
indexx *= 2;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
indexx = 1;
goto_xy(y, x);
cout << " ";
x += fc;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
}
}else if(maps6_2[x + 1][y] == 'R'){
system("cls");
bool k = play_6_2();
system("cls");
return k;
}
if(up == 1 && index <= 0 && maps6_2[x - 1][y] != '*' && maps6_2[x - 1][y] != 'f'){
goto_xy(y, x);
cout << " ";
indexy /= 2;
int fc = 0;
for(int i = 1; i <= indexy; i++){
if(maps6_2[x - i][y] != '*' && maps6_2[x - i][y] != 'f'){
fc++;
}else{
break;
}
}
if(fc < indexy){
x -= fc;
up = 0;
indexy = 4;
index = 0;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
x -= indexy;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
index++;
}else if(maps6_2[x - 1][y] == 'f'){
break;
}else{
indexy = 4;
up = 0, index = 0;
}
// if(y == 9 && !numck){
// maps6_2[5][10] = 'R';
// maps6_2[5][11] = 'R';
// goto_xy(10, 5);
// SetConsoleColor(RED);
// cout << "█";
// goto_xy(11, 5);
// SetConsoleColor(RED);
// cout << "█";
// numck = 1;
// }
Sleep(70);
if(KEY_DOWN(87) && maps6_2[x + 1][y] == '*'){
up = 1;
}
if(KEY_DOWN(65) && y > 0 && maps6_2[x][y - 1] != '*' && maps6_2[x][y - 1] != '-'){
if(maps6_2[x][y - 1] == 'f'){
break;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps6_2[x][y - i] != '*' && maps6_2[x][y - i] != 'f' && maps6_2[x][y - i] != 'R'){
index++;
}else{
if(maps6_2[x][y - i] == 'f'){
system("cls");
return true;
}else if(maps6_2[x][y - i] == 'R'){
system("cls");
bool k = play_6_2();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y -= index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y--;
goto_xy(y, x);
cout << "█";
}
}
if(KEY_DOWN(68) && maps6_2[x][y + 1] != '*' && maps6_2[x][y - 1] != '-'){
if(maps6_2[x][y + 1] == 'f'){
return true;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps6_2[x][y + i] != '*' && maps6_2[x][y + i] != 'f' && maps6_2[x][y + i] != 'R'){
index++;
}else{
if(maps6_2[x][y + i] == 'f'){
system("cls");
return true;
}else if(maps6_2[x][y + i] == 'R'){
system("cls");
bool k = play_6_2();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y += index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y++;
goto_xy(y, x);
cout << "█";
}
}
}
}
return true;
}
bool play_7(){
int x = 0, y = 0;
for(int i = 0; i < 7; i++){
int n = strlen(maps6[i]);
for(int j = 0; j < n; j++){
if(maps6[i][j] == '='){
x = i, y = j;
break;
}
}
}
{
int up = 0;
int index = 0;
int indexx = 1;
int indexy = 4;
system("cls");
SetConsoleColor(WHITE);
for(int i = 0; i < 7; i++){
int n = strlen(maps6[i]);
for(int j = 0; j < n; j++){
if(j < n){
if(maps6[i][j] == 'R'){
SetConsoleColor(RED);
cout << "█";
}else if(maps6[i][j] == 'f'){
SetConsoleColor(GREEN);
cout << "█";
}
else if(maps6[i][j] == '*'){
SetConsoleColor(YELLOW);
cout << "█";
}
else if(maps6[i][j] == ' '){
cout << " ";
}
else if(maps6[i][j] == '='){
SetConsoleColor(WHITE);
cout << "█";
}
}
}cout << '\n';
}
while(1){
if(KEY_DOWN(27)){
return false;
}
if(maps6[x + 1][y] != '*' && maps6[x - 1][y] != '-' && up == 0 && maps6[x - 1][y] != 'R'){
if(maps6[x + 1][y] == 'f'){
system("cls");
break;
}
int fc = 0;
bool fl = 1;
for(int i = 1; i <= indexx; i++){
if(maps6[x + i][y] != '*' && maps6[x + i][y] != 'f'){
if(maps6[x + i][y] == 'R'){
system("cls");
bool k = play_7();
system("cls");
return k;
}
fc++;
}else{
break;
}
}if(fl){
if(fc == indexx){
goto_xy(y, x);
cout << " ";
x += indexx;
indexx *= 2;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
indexx = 1;
goto_xy(y, x);
cout << " ";
x += fc;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
}
}else if(maps6[x + 1][y] == 'R'){
system("cls");
bool k = play_7();
system("cls");
return k;
}
if(up == 1 && index <= 0 && maps6[x - 1][y] != '*' && maps6[x - 1][y] != 'f'){
goto_xy(y, x);
cout << " ";
indexy /= 2;
int fc = 0;
for(int i = 1; i <= indexy; i++){
if(maps6[x - i][y] != '*' && maps6[x - i][y] != 'f'){
fc++;
}else{
break;
}
}
if(fc < indexy){
x -= fc;
up = 0;
indexy = 4;
index = 0;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
x -= indexy;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}
index++;
}else if(maps6[x - 1][y] == 'f'){
break;
}else{
indexy = 4;
up = 0, index = 0;
}
// if(y == 9 && !numck){
// maps6[5][10] = 'R';
// maps6[5][11] = 'R';
// goto_xy(10, 5);
// SetConsoleColor(RED);
// cout << "█";
// goto_xy(11, 5);
// SetConsoleColor(RED);
// cout << "█";
// numck = 1;
// }
Sleep(70);
if(KEY_DOWN(87) && maps6[x + 1][y] == '*'){
up = 1;
}
if(KEY_DOWN(65) && y > 0 && maps6[x][y - 1] != '*' && maps6[x][y - 1] != '-'){
if(maps6[x][y - 1] == 'f'){
break;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps6[x][y - i] != '*' && maps6[x][y - i] != 'f' && maps6[x][y - i] != 'R'){
index++;
}else{
if(maps6[x][y - i] == 'f'){
system("cls");
return true;
}else if(maps6[x][y - i] == 'R'){
system("cls");
bool k = play_7();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y -= index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y--;
goto_xy(y, x);
cout << "█";
}
}
if(KEY_DOWN(68) && maps6[x][y + 1] != '*' && maps6[x][y - 1] != '-'){
if(maps6[x][y + 1] == 'f'){
return true;
}
if(KEY_DOWN(16)){
int index = 0;
for(int i = 1; i <= 2; i++){
if(maps6[x][y + i] != '*' && maps6[x][y + i] != 'f' && maps6[x][y + i] != 'R'){
index++;
}else{
if(maps6[x][y + i] == 'f'){
system("cls");
return true;
}else if(maps6[x][y + i] == 'R'){
system("cls");
bool k = play_7();
system("cls");
return k;
}
break;
}
}
goto_xy(y, x);
cout << " ";
y += index;
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << "█";
}else{
goto_xy(y, x);
SetConsoleColor(WHITE);
cout << " ";
y++;
goto_xy(y, x);
cout << "█";
}
}
}
}
return true;
}
void play_menu(){
int menu = 1;
bool flag = 1;
while(1){
if(flag){
SetConsoleColor(GREEN);
if(idxnum < menu){
SetConsoleColor(DARK_GRAY);
}
cout << "\n\n\n\n\n";
cout << " <part " << menu << ">";
cout << "\n\n\n\n\n";
SetConsoleColor(WHITE);
if(vKey > 1){
cout << "You have got " << vKey << " keys.\n";
}else{
cout << "You have got " << vKey << " key.\n";
}
cout << "Tips: If you have got 5 keys, you can into the door...";
flag = 0;
}
Sleep(50);
if(KEY_DOWN(27)){
return;
}
if(KEY_DOWN(38)){
if(menu != 1){
menu--;
system("cls");
flag = 1;
}
}
if(KEY_DOWN(40)){
if(menu != 6){
menu++;
system("cls");
flag = 1;
}
}
if(KEY_DOWN(13) && !(idxnum < menu)){
if(menu == 1){
if(play_1()){
if(idxnum == 1){
idxnum++;
}
}
system("cls");
}
if(menu == 2){
if(play_2()){
if(idxnum == 2){
idxnum++;
}
}
system("cls");
}
if(menu == 3){
if(play_3()){
if(idxnum == 3){
idxnum++;
}
}
system("cls");
}
if(menu == 4){
if(play_4()){
if(idxnum == 4){
idxnum++;
}
}
system("cls");
}
if(menu == 5){
if(play_5()){
if(idxnum == 5){
idxnum++;
}
}
system("cls");
}
if(menu == 6){
if(vKey < 5){
play_6();
}else{
play_6_2();
}
system("cls");
if(idxnum == 6){
idxnum++;
}
}
flag = 1;
freopen("player.play", "w", stdout);
cout << idxnum;
fclose(stdout);
}
}
return;
}
void f_play(){
int menu = 1;
bool flag = 1;
while(1){
if(flag){
SetConsoleColor(RED);
cout << "█ █\n";
SetConsoleColor(YELLOW);
cout << "| Part one: start |\n";
SetConsoleColor(BROWN);
cout << "|=========---========|\n";
cout << "\n\n";
SetConsoleColor(WHITE);
if(menu == 1){
SetConsoleColor(GREEN);
}
cout << " <play> ";
SetConsoleColor(WHITE);
if(menu == 2){
SetConsoleColor(GREEN);
}
cout << "\n\n";
cout << " <about> ";
SetConsoleColor(WHITE);
if(menu == 3 && idxnum >= 7){
SetConsoleColor(GREEN);
}
flag = 0;
}
Sleep(50);
if(KEY_DOWN(38)){
if(menu != 1){
menu--;
}
system("cls");
flag = 1;
}
if(KEY_DOWN(40)){
if(menu != 2){
menu++;
}
system("cls");
flag = 1;
}
if(KEY_DOWN(13)){
if(menu == 2){
system("start https://hydro.ac/blog/38322/67978f6f273a97e654f143a5");
}else{
system("cls");
play_menu();
system("cls");
flag = 1;
}
}
}
}
int main(){
freopen("player.play", "r", stdin);
cin >> idxnum;
fclose(stdin);
f_play();
return 0;
}