今天第四次写博客,给大家发一个坦克大战的初始版,可以开外挂,要自己去探索
#include<windows.h>
#include<conio.h>
#include<iostream>
#include<stdio.h>
#include<cstring>
#include<string>
#include<fstream>
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,1,1,1,1,1,0,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