极速对决--游戏板子

· · 休闲·娱乐

#include <bits/stdc++.h>
#include <windows.h>
#include <conio.h>
#include <unistd.h>
using namespace std;

const int X=63;
const int Y=63;
const int dx[8]= {-1,0,1,0,-1,1,1,-1};
const int dy[8]= {0,-1,0,1,-1,-1,1,1};
struct XY {
    int x,y;
};
int refresh=12;
int game_time=0;
int game_score=0;
int frame=0;
int system_version=0;
bool login=0;
int start_time=0,now_time=0;
XY p1= {61,1},p2= {1,61};
int p1_s=0,p2_s=0;
int p1_b=0,p2_b=0;
char key;
string file;
string user_name;
int now_map[X][Y]= {0};
int game_map[2][X][Y]= {
    {
        {1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1},
        {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
        {1,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,0,1},
        {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1},
        {1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1},
        {1,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2},
        {2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2}
    }
};
bool key_down(int a) {
    return GetAsyncKeyState(a)&0x8000;
}
void gotoxy(short x,short y) {
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), {x,y});
    return;
}
void color(short a) {
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
    return;
}
int get_system_edition() {
    typedef void(__stdcall*NTPROC)(DWORD*,DWORD*,DWORD*);
    DWORD dwMajor,dwMinor,dwBuildNumber;
    NTPROC proc=(NTPROC)GetProcAddress(LoadLibrary("ntdll.dll"),"RtlGetNtVersionNumbers");
    proc(&dwMajor,&dwMinor,&dwBuildNumber);
    if(dwMajor==10&&dwMinor==0) {
        return 10;
    } else {
        return 7;
    }
}
void get_map(int a) {
    for(int i=0; i<X; i++) {
        for(int j=0; j<Y; j++) {
            now_map[i][j]=game_map[a][i][j];
        }
    }
    return;
}
void print_color(string s,short a) {
    color(a);
    printf("%s",s.data());
    color(7);
    return;
}
void print_block(XY a) {
    if(a.x<0||a.x>=X||a.y<0||a.y>=Y) {
        print_color("  ",240);
    } else if(a.x==p1.x&&a.y==p1.y) {
        print_color("★",9);
    } else if(a.x==p2.x&&a.y==p2.y) {
        print_color("★",12);
    } else if(now_map[a.x][a.y]==0) {
        print_color("  ",7);
    } else if(now_map[a.x][a.y]==1) {
        print_color("■",7);
    } else if(now_map[a.x][a.y]==2) {
        print_color("  ",240);
    } else if(now_map[a.x][a.y]==3) {
        print_color("■",7);
    } else if(now_map[a.x][a.y]==7) {
        print_color("▲",9);
    } else if(now_map[a.x][a.y]==8) {
        print_color("▲",12);
    } else if(now_map[a.x][a.y]==9) {
        print_color("▲",7);
    }
    return;
}
void print_map() {
    gotoxy(0,0);
    if(system_version==7) {
        printf("┌───────┬───────┐\n");
        for(int i=-3; i<=3; i++) {
            printf("│");
            for(int j=-3; j<=3; j++) {
                print_block({p1.x+i,p1.y+j});
            }
            printf("│");
            for(int j=-3; j<=3; j++) {
                print_block({p2.x+i,p2.y+j});
            }
            printf("│\n");
        }
        printf("├───────┴───────┤\n");
        printf("│           %02d分%02d秒           │\n",(game_time-(now_time-start_time))/60,(game_time-(now_time-start_time))%60);
        printf("│%02d滴     %03d分:%03d分     %02d滴│\n",p1_b,p1_s,p2_s,p2_b);
        printf("└───────────────┘\n");
    } else {
        printf("┌───────────────┬───────────────┐\n");
        for(int i=-3; i<=3; i++) {
            printf("│ ");
            for(int j=-3; j<=3; j++) {
                print_block({p1.x+i,p1.y+j});
            }
            printf("│ ");
            for(int j=-3; j<=3; j++) {
                print_block({p2.x+i,p2.y+j});
            }
            printf("│\n");
        }
        printf("├───────────────┴───────────────┤\n");
        printf("│            %02d分%02d秒           │\n",(game_time-(now_time-start_time))/60,(game_time-(now_time-start_time))%60);
        printf("│ %02d滴     %03d分:%03d分     %02d滴│\n",p1_b,p1_s,p2_s,p2_b);
        printf("└───────────────────────────────┘\n");
    }
    return;
}
bool is(XY a,bool m,bool p) {
    if(a.x<0||a.x>=X||a.y<0||a.y>=Y) {
        return 0;
    }
    if(now_map[a.x][a.y]==1) {
        return 0;
    }
    if(m==1) {
        if(p==0) {
            if(a.x==p2.x&&a.y==p2.y) {
                p2_b-=1;
                return 0;
            }
        } else {
            if(a.x==p1.x&&a.y==p1.y) {
                p1_b-=1;
                return 0;
            }
        }
    }
    if((a.x==p2.x&&a.y==p2.y)||(a.x==p1.x&&a.y==p1.y)) {
        return 0;
    }
    return 1;
}
void go(XY a,bool t1,bool t2,bool t3,bool t4,bool p) {
    if(t1&&t3) {
        t1=0;
        t3=0;
    }
    if(t2&&t4) {
        t2=0;
        t4=0;
    }
    if(t1&&t2) {
        if((is({a.x-1,a.y},0,p)||is({a.x,a.y-1},0,p))&&is({a.x-1,a.y-1},1,p)) {
            a= {a.x-1,a.y-1};
        }
    } else if(t1&&t4) {
        if((is({a.x,a.y+1},0,p)||is({a.x-1,a.y},0,p))&&is({a.x-1,a.y+1},1,p)) {
            a= {a.x-1,a.y+1};
        }
    } else if(t2&&t3) {
        if((is({a.x,a.y-1},0,p)||is({a.x+1,a.y},0,p))&&is({a.x+1,a.y-1},1,p)) {
            a= {a.x+1,a.y-1};
        }
    } else if(t3&&t4) {
        if((is({a.x+1,a.y},0,p)||is({a.x,a.y+1},0,p))&&is({a.x+1,a.y+1},1,p)) {
            a= {a.x+1,a.y+1};
        }
    } else if(t1) {
        if(is({a.x-1,a.y},1,p)) {
            a= {a.x-1,a.y};
        }
    } else if(t2) {
        if(is({a.x,a.y-1},1,p)) {
            a= {a.x,a.y-1};
        }
    } else if(t3) {
        if(is({a.x+1,a.y},1,p)) {
            a= {a.x+1,a.y};
        }
    } else if(t4) {
        if(is({a.x,a.y+1},1,p)) {
            a= {a.x,a.y+1};
        }
    }
    if(p==0) {
        p1=a;
        if(now_map[a.x][a.y]==8||now_map[a.x][a.y]==9) {
            now_map[a.x][a.y]=7;
            p1_s+=1;
            p1_b=min(10,p1_b+1);
        }
    } else {
        p2=a;
        if(now_map[a.x][a.y]==7||now_map[a.x][a.y]==9) {
            now_map[a.x][a.y]=8;
            p2_s+=1;
            p2_b=min(10,p2_b+1);
        }
    }
    return;
}
double score(int s1,int s2) {
    if(s1==0) {
        return 0.0;
    }
    if(s2==0) {
        return 9.9;
    }
    return max(min(5.812*pow(1.053,s1*1.0/s2)*pow(s1*1.0/s2,0.13),9.9),0.0);
}
void read_file() {
    if(login) {
        FILE *fp=fopen(file.data(),"r");
        fscanf(fp,"%s\n",user_name.data());
        fclose(fp);
    }
    return;
}
void write_file() {
    if(login) {
        FILE *fp=fopen(file.data(),"w");
        fprintf(fp,"%s\n",user_name.data());
        fclose(fp);
    }
    return;
}
int main() {
    system("mode con cols=35 lines=13");
    CONSOLE_CURSOR_INFO cursor_info= {1,0};
    SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);
    system_version=get_system_edition();
    if(system_version==7) {
        SetConsoleTitle("极速对决 win7版");
    } else {
        SetConsoleTitle("极速对决 win10版");
    }
    do {
        gotoxy(0,0);
        if(system_version==7) {
            printf("┌───────────────┐\n");
            printf("│           欢迎登录           │\n");
            printf("├───────┬───────┤\n");
            printf("│              │              │\n");
            printf("│1. 账号登录   │2. 游客登录   │\n");
            printf("│              │              │\n");
            printf("│              │              │\n");
            printf("│              │              │\n");
            printf("│              │              │\n");
            printf("│              │              │\n");
            printf("│              │              │\n");
            printf("└───────┴───────┘\n");
        } else {
            printf("┌───────────────────────────────┐\n");
            printf("│            欢迎登录           │\n");
            printf("│───────────────┬───────────────│\n");
            printf("│               │               │\n");
            printf("│ 1. 账号登录   │ 2. 游客登录   │\n");
            printf("│               │               │\n");
            printf("│               │               │\n");
            printf("│               │               │\n");
            printf("│               │               │\n");
            printf("│               │               │\n");
            printf("│               │               │\n");
            printf("└───────────────┴───────────────┘\n");
        }
        key=getch();
    } while(key!='1'&&key!='2');
    if(key=='1') {
        do {
            gotoxy(0,0);
            if(system_version==7) {
                printf("┌───────────────┐\n");
                printf("│           账号登录           │\n");
                printf("├───────────────┤\n");
                printf("│                              │\n");
                printf("│请输入存档文件名:            │\n");
                printf("│                              │\n");
                printf("│                              │\n");
                printf("│                              │\n");
                printf("│                              │\n");
                printf("│                              │\n");
                printf("│                              │\n");
                printf("└───────────────┘\n");
            } else {
                printf("┌───────────────────────────────┐\n");
                printf("│            账号登录           │\n");
                printf("│───────────────────────────────│\n");
                printf("│                               │\n");
                printf("│ 请输入存档文件名:            │\n");
                printf("│                               │\n");
                printf("│                               │\n");
                printf("│                               │\n");
                printf("│                               │\n");
                printf("│                               │\n");
                printf("│                               │\n");
                printf("└───────────────────────────────┘\n");
            }
            gotoxy(20,4);
            scanf("%s",file.data());
        } while(access(file.data(),0)!=0);
        user_name="test";
        login=1;
    } else if(key=='2') {
        user_name="游客";
        login=0;
    }
    read_file();
    while(1) {
        do {
            gotoxy(0,0);
            if(system_version==7) {
                printf("┌───────────────┐\n");
                printf("│           极速对决           │\n");
                printf("├───────────────┤\n");
                printf("│用户名:                      │\n");
                printf("├───────┬───────┤\n");
                printf("│     地图     │     功能     │\n");
                printf("├───────┼───────┤\n");
                printf("│1. 经典       │A. 游戏信息   │\n");
                printf("│2. 迷你       │B. 智能修复   │\n");
                printf("│              │C. 退出系统   │\n");
                printf("│              │              │\n");
                printf("└───────┴───────┘\n");
            } else {
                printf("┌───────────────────────────────┐\n");
                printf("│            极速对决           │\n");
                printf("│───────────────────────────────│\n");
                printf("│ 用户名:                      │\n");
                printf("├───────────────┬───────────────┤\n");
                printf("│      地图     │      功能     │\n");
                printf("├───────────────┼───────────────┤\n");
                printf("│ 1. 经典       │ A. 游戏信息   │\n");
                printf("│ 2. 迷你       │ B. 智能修复   │\n");
                printf("│               │ C. 退出系统   │\n");
                printf("│               │               │\n");
                printf("└───────────────┴───────────────┘\n");
            }
            gotoxy(10,3);
            printf("%s",user_name.data());
            key=getch();
        } while(key!='1'&&key!='2'&&key!='a'&&key!='A'&&key!='b'&&key!='B'&&key!='c'&&key!='C'&&key!='d'&&key!='D'&&key!='e'&&key!='E');
        if(key=='1'||key=='2') {
            if(key=='1') {
                p1= {61,1};
                p2= {1,61};
                game_time=300;
                game_score=100;
            } else if(key=='2') {
                p1= {34,28};
                p2= {28,34};
                game_time=60;
                game_score=100;
            }
            p1_s=0;
            p2_s=0;
            p1_b=10;
            p2_b=10;
            frame=0;
            start_time=time(0);
            now_time=time(0);
            get_map(key-'0'-1);
            while(now_time-start_time<game_time&&p1_s<game_score&&p2_s<game_score&&p1_b>0&&p2_b>0) {
                now_time=time(0);
                print_map();
                frame++;
                usleep(1000000.0/refresh);
                go(p1,key_down(87),key_down(65),key_down(83),key_down(68),0);
                go(p2,key_down(38),key_down(37),key_down(40),key_down(39),1);
            }
            do {
                gotoxy(0,0);
                if(system_version==7) {
                    printf("┌───────────────┐\n");
                    printf("│           比赛结果           │\n");
                    printf("├───────────────┤\n");
                    printf("│获胜者:%s                  │\n",((p1_b==0&&p2_b==0)?"平局":(p1_b==0?"红队":(p2_b==0?"蓝队":(p1_s==p2_s?"平局":(p1_s>p2_s?"蓝队":"红队"))))));
                    printf("│比赛用时:%02d分%02d秒            │\n",(now_time-start_time)/1000/60,(now_time-start_time)/1000%60);
                    printf("│平均帧率:%05.2lf帧             │\n",frame*1.0/(now_time-start_time));
                    printf("├───────┬───────┤\n");
                    printf("│     蓝队     │     红队     │\n");
                    printf("├───────┼───────┤\n");
                    printf("│得分:%03d分   │得分:%03d分   │\n",p1_s,p2_s);
                    printf("│评分:%3.1lf分   │评分:%3.1lf分   │\n",score(p1_s,p2_s),score(p2_s,p1_s));
                    printf("└───────┴───────┘\n");
                } else {
                    printf("┌───────────────────────────────┐\n");
                    printf("│            比赛结果           │\n");
                    printf("├───────────────────────────────┤\n");
                    printf("│ 获胜者:%s                  │\n",((p1_b==0&&p2_b==0)?"平局":(p1_b==0?"红队":(p2_b==0?"蓝队":(p1_s==p2_s?"平局":(p1_s>p2_s?"蓝队":"红队"))))));
                    printf("│ 比赛用时:%02d分%02d秒            │\n",(now_time-start_time)/60,(now_time-start_time)%60);
                    printf("│ 平均帧率:%05.2lf帧             │\n",frame*1.0/(now_time-start_time));
                    printf("├───────────────┬───────────────┤\n");
                    printf("│      蓝队     │      红队     │\n");
                    printf("├───────────────┼───────────────┤\n");
                    printf("│ 得分:%03d分   │ 得分:%03d分   │\n",p1_s,p2_s);
                    printf("│ 评分:%3.1lf分   │ 评分:%3.1lf分   │\n",score(p1_s,p2_s),score(p2_s,p1_s));
                    printf("└───────────────┴───────────────┘\n");
                }
                key=getch();
            } while(key!=' ');
            write_file();
        } else if(key=='a'||key=='A') {
            while(1) {
                do {
                    gotoxy(0,0);
                    if(system_version==7) {
                        printf("┌───────────────┐\n");
                        printf("│           游戏信息           │\n");
                        printf("├───────────────┤\n");
                        printf("│1. 基本信息                   │\n");
                        printf("│2. 游戏参数                   │\n");
                        printf("│3. 游戏操作                   │\n");
                        printf("│                              │\n");
                        printf("│                              │\n");
                        printf("│                              │\n");
                        printf("│                              │\n");
                        printf("│                              │\n");
                        printf("└───────────────┘\n");
                    } else {
                        printf("┌───────────────────────────────┐\n");
                        printf("│            游戏信息           │\n");
                        printf("│───────────────────────────────│\n");
                        printf("│ 1. 基本信息                   │\n");
                        printf("│ 2. 游戏参数                   │\n");
                        printf("│ 3. 游戏操作                   │\n");
                        printf("│                               │\n");
                        printf("│                               │\n");
                        printf("│                               │\n");
                        printf("│                               │\n");
                        printf("│                               │\n");
                        printf("└───────────────────────────────┘\n");
                    }
                    key=getch();
                } while(key!='1'&&key!='2'&&key!='3'&&key!=' ');
                if(key=='1') {
                    do {
                        gotoxy(0,0);
                        if(system_version==7) {
                            printf("┌───────────────┐\n");
                            printf("│           基本信息           │\n");
                            printf("├───────────────┤\n");
                            printf("│1. 游戏名称:《极速对决》     │\n");
                            printf("│2. 游戏作者:lailai0916       │\n");
                            printf("│3. 游戏调试:tanng            │\n");
                            printf("│4. 支持系统:win7、win10      │\n");
                            printf("│                              │\n");
                            printf("│                              │\n");
                            printf("│                              │\n");
                            printf("│                              │\n");
                            printf("└───────────────┘\n");
                        } else {
                            printf("┌───────────────────────────────┐\n");
                            printf("│            基本信息           │\n");
                            printf("│───────────────────────────────│\n");
                            printf("│ 1. 游戏名称:《极速对决》     │\n");
                            printf("│ 2. 游戏作者:lailai0916       │\n");
                            printf("│ 3. 游戏调试:tanng            │\n");
                            printf("│ 4. 支持系统:win7、win10      │\n");
                            printf("│                               │\n");
                            printf("│                               │\n");
                            printf("│                               │\n");
                            printf("│                               │\n");
                            printf("└───────────────────────────────┘\n");
                        }
                        key=getch();
                    } while(key!=' ');
                } else if(key=='2') {
                    do {
                        gotoxy(0,0);
                        if(system_version==7) {
                            printf("┌───────────────┐\n");
                            printf("│           游戏参数           │\n");
                            printf("├───────────────┤\n");
                            printf("│1. 游戏人数:2人              │\n");
                            printf("│2. 地图大小:63*63格          │\n");
                            printf("│3. 游戏时间:300秒            │\n");
                            printf("│4. 获胜得分:100分            │\n");
                            printf("│5. 理论帧率:%02d帧             │\n",refresh);
                            printf("│                              │\n");
                            printf("│                              │\n");
                            printf("│                              │\n");
                            printf("└───────────────┘\n");
                        } else {
                            printf("┌───────────────────────────────┐\n");
                            printf("│            游戏参数           │\n");
                            printf("│───────────────────────────────│\n");
                            printf("│ 1. 游戏人数:2人              │\n");
                            printf("│ 2. 地图大小:63*63格          │\n");
                            printf("│ 3. 游戏时间:300秒            │\n");
                            printf("│ 4. 获胜得分:100分            │\n");
                            printf("│ 5. 理论帧率:%02d帧             │\n",refresh);
                            printf("│                               │\n");
                            printf("│                               │\n");
                            printf("│                               │\n");
                            printf("└───────────────────────────────┘\n");
                        }
                        key=getch();
                    } while(key!=' ');
                } else if(key=='3') {
                    do {
                        gotoxy(0,0);
                        if(system_version==7) {
                            printf("┌───────────────┐\n");
                            printf("│           游戏操作           │\n");
                            printf("├───────┬───────┤\n");
                            printf("│   W A S D    │   蓝方移动   │\n");
                            printf("│              │              │\n");
                            printf("│   ↑←↓→   │   红方移动   │\n");
                            printf("│              │              │\n");
                            printf("│    空格键    │     退出     │\n");
                            printf("│              │              │\n");
                            printf("│              │              │\n");
                            printf("│              │              │\n");
                            printf("└───────┴───────┘\n");
                        } else {
                            printf("┌───────────────────────────────┐\n");
                            printf("│            游戏操作           │\n");
                            printf("│───────────────────────────────│\n");
                            printf("│    W A S D    │    蓝方移动   │\n");
                            printf("│               │               │\n");
                            printf("│    ↑←↓→   │    红方移动   │\n");
                            printf("│               │               │\n");
                            printf("│     空格键    │      退出     │\n");
                            printf("│               │               │\n");
                            printf("│               │               │\n");
                            printf("│               │               │\n");
                            printf("└───────────────────────────────┘\n");
                        }
                        key=getch();
                    } while(key!=' ');
                } else if(key==' ') {
                    break;
                }
            }
        } else if(key=='b'||key=='B') {
            write_file();
            system("mode con cols=35 lines=13");
            CONSOLE_CURSOR_INFO cursor_info= {1,0};
            SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);
            system_version=get_system_edition();
            system("cls");
        } else if(key=='c'||key=='C') {
            write_file();
            system("cls");
            break;
        }
    }
    return 0;
}