include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
include[HTML_REMOVED]
using namespace std;
SYSTEMTIME sys;
int checkpoint,time,time2,times,times2;
int e[20]= {1,2,3,4,6,8,10,12,15,18,21,24,28,32,37,42,48,55,65,76};
int e2[20]= {100,95,80,76,72,68,64,61,58,55,52,47,43,39,34,30,24,18,15,10};
bool equipment[2][10];
double equipment_health[2][10];
struct tank {
int x,y,d,color,shells_number;
int interval[2];
} I_tank;
struct bullet {
int x,y,d,color;
bool fire;
} shells[100];
struct enemy {
int x,y,d,j,color;
bool go;
} enemies[7];
char checkpoint_name[6][4][8]= {
{“Leve 01”,”Leve 02”,”Leve 03”,”Leve 04”},
{“Leve 05”,”Leve 06”,”Leve 07”,”Leve 08”},
{“Leve 09”,”Leve 10”,”Leve 11”,”Leve 12”},
{“Leve 13”,”Leve 14”,”Leve 15”,”Leve 16”},
{“Leve 17”,”Leve 18”,”Leve 19”,”Leve 20”},
{” color “,” store “,” 关于 “,” 退出 “}
};
bool er[29][29]= {
{1,1,1,1,1,1,1,0,0,0,0,1,1,1,1,0,0,0,0,1,1,0,1,1,1,1,1,1,1},
{1,0,0,0,0,0,1,0,1,0,1,1,1,1,1,1,0,0,1,1,0,0,1,0,0,0,0,0,1},
{1,0,1,1,1,0,1,0,0,1,0,1,0,0,1,1,0,0,0,1,0,0,1,0,1,1,1,0,1},
{1,0,1,1,1,0,1,0,1,0,0,1,1,1,0,1,0,1,1,0,0,0,1,0,1,1,1,0,1},
{1,0,1,1,1,0,1,0,1,0,1,1,0,1,1,0,0,0,1,1,1,0,1,0,1,1,1,0,1},
{1,0,0,0,0,0,1,0,0,1,0,1,0,0,0,1,0,0,0,0,1,0,1,0,0,0,0,0,1},
{1,1,1,1,1,1,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,1,1,1,1,1,1},
{0,0,0,0,0,0,0,0,1,1,1,1,1,0,1,1,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0,1,1,1,1,1,1,0,0,1,1},
{1,0,1,1,1,0,1,0,1,0,1,1,0,1,1,0,0,1,1,0,1,1,0,1,0,0,0,1,0},
{1,0,1,1,1,0,1,0,0,0,1,1,1,1,0,1,0,1,0,1,0,0,0,0,1,1,0,1,1},
{1,0,0,0,0,0,1,0,1,0,1,1,0,1,0,0,1,0,1,0,1,1,0,0,1,1,1,0,1},
{1,1,1,1,1,1,1,0,0,1,1,1,0,0,0,1,0,0,1,1,0,1,1,1,1,0,1,0,0}
};
int ccs[20]= {10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10,10};
bool boss[20]= {1};
int score;
void I_tank_color();
void enter();
void main_interface(int x,int y);
void Generate_enemy(int i);
void score_g();
void game_over();
void I_tank_mobile(int k);
void shells_fire(int x,int y,int d,int c);
void shells_mobile();
void tank_according(int x,int y,int d,int tank_color);
void tank_clean(int x,int y,int d);
void gotoxy(int x,int y);
void color(int a);
void Initialize();
void Initialize2();
void Initialization_fence();
void fighting();
void store();
void print(char a[],int b);
void cursor(bool a);
void cursor(bool a) {
HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
CONSOLE_CURSOR_INFO CursorInfo;
GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
CursorInfo.bVisible = a;
SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
void cundang() {
ofstream cd(“cundang.exe”);
cd<<true<<endl;
for(int i=0; i<20; i)cd<<boss[i]<<” “;
cd<<endl;
cd<<I_tank.color<<endl;
for(int l=0; l<2; l) {
for(int i=0; i<20; i) {
cd<<equipment[l][i]<<” “;
cd<<equipment_health[l][i]*1000000<<” “;
}
cd<<endl;
}
cd.close();
SetFileAttributes(“cundang.exe”,FILE_ATTRIBUTE_HIDDEN );
}
void activity() {
system(“cls”);
system(“color f0”);
gotoxy(2,0);
printf(“\t\t参与书涵小游戏工作室附加活动:”);
for(int i=0; i<29; i) {
gotoxy(2,i+2);
for(int l=0; l<29; l) {
if(er[i][l])color(0);
else color(511);
printf(“■”);
}
if(i==5) {
color(496);
printf(” 手”);
}
if(i==10) {
color(496);
printf(” 机”);
}
if(i==15) {
color(496);
printf(” 扫”);
}
if(i==20) {
color(496);
printf(” 一”);
}
if(i==25) {
color(496);
printf(” 扫”);
}
}
gotoxy(2,33);
color(496);
printf(“\t\t\t光盘行动推动者”);
char x;
scanf(“%c”,&x);
Sleep(3000);
}
void print(char a[],int b) {
int s=strlen(a);
for(int i=0; i<s; i) {
printf(“%c”,a[i]);
Sleep(b);
}
}
void score_g() {
gotoxy(0,0);
color(7);
printf(“score:%d/%d”,score,ccs[checkpoint]);
gotoxy(10,0);
printf(“shells:%d”,I_tank.shells_number);
gotoxy(20,0);
int temp=sys.wSecond-time;
int temp2=sys.wMinute-time2;
if(temp<0) {
temp=60+temp;
temp2–;
}
printf(“存活时间:%d分%d秒\t”,times2,times);
gotoxy(40,0);
printf(“awsd移动 k发炮 “);
printf(“Level %d j暂停\t\t\t”,checkpoint+1);
}
void game_over() {
gotoxy(32,21);
color(7);
printf(“Game Over!”);
gotoxy(32,22);
printf(“Score:%d”,score);
gotoxy(31,23);
printf(“存活时间:%d分%d秒\t”,times2,times);
if(ccs[checkpoint]<=score) {
MessageBox(NULL,”恭喜你通关了”,”通关!”,MB_OK+48);
boss[checkpoint+1]=1;
cundang();
} else {
MessageBox(NULL,”很遗憾,失败!\n”,”失败!”,MB_OK+16);
gotoxy(31,24);
cout<<ccs[checkpoint]<<”分通关!\n”;
}
Sleep(1000);
getch();
if(rand()%5==rand()%5) {
if(MessageBox(NULL,”参与书涵小游戏工作室附加活动:\n光盘行动推动者”,”活动”,MB_OKCANCEL+64)==1)activity();
}
main_interface(checkpoint%4,checkpoint/4);
}
void tank_clean(int x,int y,int d) {
color(0);
switch(d) {
case 0:
gotoxy(x+1,y);
printf(“■”);
gotoxy(x,y+1);
printf(“■■■”);
gotoxy(x,y+2);
printf(“■■■”);
break;
case 1:
gotoxy(x,y);
printf(“■■”);
gotoxy(x,y+1);
printf(“■■■”);
gotoxy(x,y+2);
printf(“■■”);
break;
case 2:
gotoxy(x,y);
printf(“■■■”);
gotoxy(x,y+1);
printf(“■■■”);
gotoxy(x+1,y+2);
printf(“■”);
break;
case 3:
gotoxy(x+1,y);
printf(“■■”);
gotoxy(x,y+1);
printf(“■■■”);
gotoxy(x+1,y+2);
printf(“■■”);
break;
}
color(7);
}
void tank_according(int x,int y,int d,int tank_color) {
color(tank_color);
switch(d) {
case 0:
gotoxy(x+1,y);
printf(“■”);
gotoxy(x,y+1);
printf(“■■■”);
gotoxy(x,y+2);
printf(“■■■”);
color(7);
break;
case 1:
gotoxy(x,y);
printf(“■■”);
gotoxy(x,y+1);
printf(“■■■”);
gotoxy(x,y+2);
printf(“■■”);
color(7);
break;
case 2:
gotoxy(x,y);
printf(“■■■”);
gotoxy(x,y+1);
printf(“■■■”);
gotoxy(x+1,y+2);
printf(“■”);
color(7);
break;
case 3:
gotoxy(x+1,y);
printf(“■■”);
gotoxy(x,y+1);
printf(“■■■”);
gotoxy(x+1,y+2);
printf(“■■”);
color(7);
break;
}
}
Md炸了
希展丰?使Md
绝了