问题标题: 酷町堂:一些微不足道的贡献

1
0
李玥仑
李玥仑
中级光能
中级光能

在第209 249 267 299 310 417 469 481~484 540~603 981 1092行中,均对外观进行了一些修改,并增加了商城中的皮肤。

我不是极昼工坊的,也不是兴安科技的,只是玩了那么久的XACRAFT,想对它做出一点贡献

喷子杠精一边去 

#include<iostream>
#include<fstream> 
#include<windows.h>
#include<cstdio>
#include<cstring>
#include<stdio.h>
#include<conio.h>
#include<time.h>
#include<vector> 
#include<sstream>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0) 
using namespace std;
string ckpf[10001];//仓库的皮肤 
bool jiandang=0;//临时变量 
int ckpfs=1;// 仓库的皮肤数量 
void HideCursor(){
    HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_CURSOR_INFO CursorInfo;
    GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
    CursorInfo.bVisible = false; //隐藏控制台光标
    SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
void console()
{
    HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);  
    CONSOLE_SCREEN_BUFFER_INFO bInfo; 
    GetConsoleScreenBufferInfo(hOut, &bInfo );  
    SetConsoleTitle("XACRAFT 2.0 简体中文版"); // 设置窗口的标题
}
string pfd="XZ";//皮肤 
long long jb=100;//金币数量 
int a[20][5][256][2049],hand[20][50],x[20]={0},y[20];
int i,j,errortimes=0;
bool kn=0;
char cmmd;
string comd;
string tecpas,tecnam,tecpin;
char ch;
int seed;
void color(int corcorcor){
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),corcorcor);
}
bool kd(char ccc){
    if(!KEY_DOWN(ccc)) return 0;
    else return 1;
}
int rdm(int aaaaa,int bbbbb){
    return rand()%(bbbbb-aaaaa+1)+aaaaa;
}
void cls(){//赟刑道提供,如有侵权请联系删除。    
    HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
    COORD coordScreen = { 0, 0 };    // home for the cursor
    SetConsoleCursorPosition( hConsole, coordScreen );
}
char gl(){
    if(kd('Q')) return 'Q';
    if(kd('W')) return 'W';
    if(kd('E')) return 'E';
    if(kd('R')) return 'R';
    if(kd('T')) return 'T';
    if(kd('Y')) return 'Y';
    if(kd('U')) return 'U';
    if(kd('I')) return 'I';
    if(kd('O')) return 'O';
    if(kd('P')) return 'P';
    if(kd('A')) return 'A';
    if(kd('S')) return 'S';
    if(kd('D')) return 'D';
    if(kd('F')) return 'F';
    if(kd('G')) return 'G';
    if(kd('H')) return 'H';
    if(kd('J')) return 'J';
    if(kd('K')) return 'K';
    if(kd('L')) return 'L';
    if(kd('Z')) return 'Z';
    if(kd('X')) return 'X';
    if(kd('C')) return 'C';
    if(kd('V')) return 'V';
    if(kd('B')) return 'B';
    if(kd('N')) return 'N';
    if(kd('M')) return 'M';
    if(kd('1')) return '1';
    if(kd('2')) return '2';
    if(kd('3')) return '3';
    if(kd('4')) return '4';
    if(kd('5')) return '5';
    if(kd('6')) return '6';
    if(kd('7')) return '7';
    if(kd('8')) return '8';
    if(kd('9')) return '9';
    if(kd('0')) return '0';
}
string getTime(){
    time_t timep;
    time (&timep);
    char tmp[64];
    strftime(tmp, sizeof(tmp), "%m%d",localtime(&timep) );
    return tmp;
}
string GetTime(){
    time_t timep;
    time (&timep);
    char tmp[64];
    strftime(tmp, sizeof(tmp), "%Y%m%d",localtime(&timep) );
    return tmp;
}
void rightLine(string str){
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<80-l;i++)
    cout<<" ";
    cout<<str<<endl;
    return ;
}
void Line(string str){
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<(w-l)/2;i++)
    cout<<" ";
    cout<<str<<endl;
    return ;
}
void line(string str){
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<(w-l)/2;i++)
    cout<<" ";
    cout<<str;
    return ;
}
void lin(string str){
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<(w-l)/2;i++)
    cout<<" ";
    cout<<str;
    return ;
}
void nameline(string str){
    int i,l,w;
    w=50;
    l=str.length();
    for(i=0;i<(w-l)/2-1;i++)
    cout<<" ";
    cout<<str;
    if((w-l)%2==0){
        for(i=0;i<(w-l)/2-1;i++)
        cout<<" ";
    }else{
        for(i=0;i<(w-l)/2;i++)
        cout<<" ";
    }
    color(7);
    cout<<"|";
    return ;
}
void passline(string str){
    int i,l,w;
    w=50;
    l=str.length();
    for(i=0;i<(w-l)/2-1;i++)
    cout<<" ";
    for(i=0;i<str.length();i++) cout<<"*";
    if((w-l)%2==0){
        for(i=0;i<(w-l)/2-1;i++)
        cout<<" ";
    }else{
        for(i=0;i<(w-l)/2;i++)
        cout<<" ";
    }
    color(7);
    cout<<"|";
    return ;
}
bool Login_getpass(){
    errortimes=0;
    cp:;
    if(errortimes>=3){
        color(13);
        cout<<endl;
        lin("错误次数过多,登录失败!");
        Sleep(3000);
        color(7);
        return 0;
    }
    tecpin="";
    ch=0;
    while(ch!=13){
        system("cls");
        color(14);
        cout<<endl;
        lin("登录 TEC 账号");
        printf("\n\n\n\n\n\n");
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |";
        color(11);
        nameline("欢迎回来,"+tecnam);
        cout<<endl;
        lin("==================================================");
        printf("\n\n\n");
        color(10);
        cout<<"               >>输入密码<<";
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |";
        passline(tecpin);
        cout<<endl;
        lin("==================================================");
        ch=_getch();
        tecpin+=ch;
        if(ch==8){
            tecpin=tecpin.substr(0,tecpin.length()-1);
            tecpin=tecpin.substr(0,tecpin.length()-1);
        }
    }
    stringstream in1;
    in1<<tecpin;
    in1>>tecpin;
    if(tecpin!=tecpas){
        cout<<endl;
        color(12);
        lin("密码错误");
        errortimes++;
        Sleep(1500);
        goto cp;
    }
    system("cls");
    return 1;
} 
void getnam(){
    tecpin="";
    ch=0;
    while(ch!=13){
        system("cls");
        color(14);
        cout<<endl;
        lin("注册 TEC 账号");
        printf("\n\n\n\n\n\n");
        color(10);
        cout<<"               >>用户名<<";
        color(15);
        cout<<"  {请输入}"; 
        if(tecpin.length()>45){
            color(12);
            cout<<"   用户名过长";
            tecpin=tecpin.substr(0,tecpin.length()-1);
        }
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |";
        nameline(tecpin);
        cout<<endl;
        lin("==================================================");
        printf("\n\n\n");
        color(10);
        cout<<"               >>密码<<";
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |                                                |";
        cout<<endl;
        lin("==================================================");
        ch=_getch();
        tecpin+=ch;
        if(ch==8){
            tecpin=tecpin.substr(0,tecpin.length()-1);
            tecpin=tecpin.substr(0,tecpin.length()-1);
        }
    }
    system("cls");
    stringstream in1;
    in1<<tecpin;
    in1>>tecnam;
    if(tecnam.length()==0) getnam();
    return ;
}
void getpas(){
    tecpin="";
    ch=0;
    while(ch!=13){
        system("cls");
        color(14);
        cout<<endl;
        lin("注册 TEC 账号");
        printf("\n\n\n\n\n\n");
        color(10);
        cout<<"               >>用户名<< 输入完成 √";//改了  >>用户名<<
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |";
        nameline(tecnam);
        cout<<endl;
        lin("==================================================");
        printf("\n\n\n");
        color(10);
        cout<<"               >>密码<<";//改了>>密码<< 
        color(15);
        cout<<"  {请输入}"; 
        if(tecpin.length()>45){
            color(12);
            cout<<"   密码过长";
            tecpin=tecpin.substr(0,tecpin.length()-1);
        }
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |";
        passline(tecpin);
        cout<<endl;
        lin("==================================================");
        ch=_getch();
        tecpin+=ch;
        if(ch==8){
            tecpin=tecpin.substr(0,tecpin.length()-1);
            tecpin=tecpin.substr(0,tecpin.length()-1);
        }
    }
    system("cls");
    tecpas=tecpin;
    if(tecpas.length()==0) getpas();
    return ;
}
void TEClogin(){
    color(7);
    ifstream fin("TEC账户.tecdata");
    fin>>tecnam>>tecpas;
    fin.close();
    if(tecnam.length()!=0 && tecpas.length()!=0){
        if(Login_getpass()==0){
            i=0;
            cout<<0/i;
        }
        return ;
    } 
    getnam();
    getpas();   
    ofstream fout("TEC账户.tecdata");
    fout<<tecnam<<endl<<tecpas;
    fout.close();
    return ;    
}
//逻辑锁部分(始)
bool end_day(){
    string tmp=GetTime(),temp="20220101";
    if(tmp>=temp) return 1;
    else return 0;
}
bool fool_days(){
    string tmp=getTime();
    if(tmp=="0401") return 1;
    else return 0;
} 
//逻辑锁部分(终) 
void Logical_Lock(){
    if(fool_days()){
        system("cls");
        color(252);
        system("cls");
        cout<<endl;
        Line("抱    歉");
        cout<<endl<<endl;
        color(240);
        Line("出于特殊原因,XACRAFT已停止更新,非常抱歉。");
        cmmd=getch();
        int fk=0;
        cout<<fk/fk;
    }
    if(end_day()){
        system("cls");
        color(252);
        system("cls");
        cout<<endl;
        Line("XACRAFT 版本过低");
        cout<<endl<<endl;
        color(240);
        Line("您现在使用的XACRAFT 2.0已于2022年1月1日过期,请更新至最新版本!");
        cmmd=getch();
        int fk=0;
        cout<<fk/fk;
    }
    return ;
}
int print(int cor){
    if(cor==1){
        color(170);//草方块 
        printf("▉ ");
    }
    else if(cor==2){
        color(34);//树叶 
        printf("▉ ");
    }
    else if(cor==3){
        color(136);//石头 
        printf("▉ ");
    }
    else if(cor==4){
        color(102);//泥土 
        printf("▉ ");
    }
    else if(cor==6){
        color(96);//橡木 
        printf("Wd");//wood
    }
    else if(cor==7){
        color(139);//钻石矿石 
        printf("∷");
    }
    else if(cor==8){
        color(142);//黄金矿石 
        printf("∷");
    }else if(cor==9){
        color(207);//苹果 
        printf("AP");
    }else if(cor==10){
        color(239);//金苹果 
        printf("GA");
    }else if(cor==11){ 
        color(238);//沙子 
        printf("▉ ");
    }else if(cor==12){
        color(239);//砂岩 
        printf("==");
    }else if(cor==13){
        color(127);//雪块
        printf("▓ ");
    }else if(cor==14){
        color(32);//仙人掌 
        printf("∷");
    }else if(cor==15){
        color(112);//白桦木
        printf("BR"); 
    }else{
        color(255);//空气 
        cout<<"  ";
    }
}
int cangk()
{
    cout<<"\n\n\n\n\n";
    cout<<"\t\t你现在所拥有的皮肤:";
    for(int i=1;i<=ckpfs;i++)
    {
        cout<<ckpfs<<"."<<ckpf[ckpfs]<<"  ";
     } 
     int bixk;
     cin>>bixk;
     pfd=ckpf[ckpfs];
     cout<<"\n\t\t\t\t\t装备成功!";
     Sleep(1000);
     return 1; 
}
int shang()//本市最繁华的商城 
{
    string gm;//改为string 
    while(1)
    {
        system("cls");
        Line("此部分由极昼工坊制作");
        cout<<"\n\n\n\n\n";
        line("你现在有:");
        cout<<jb<<"jb\n";
        Line("1.行走纪念皮肤  :AW  (99jb) ");
        Line("2.XA系统纪念皮肤:XA  (99jb) ");
        Line("3.MC致敬皮肤    :MC  (99jb) ");
        Line("4.首发纪念皮肤  :┳  (666jb)");
       	Line("5.Steve         :se (149jb)"); //增加了481~484 
       	Line("6.Alex          :ae (149jb)"); 
       	Line("7.水贴国纪念皮肤:氼 (199jb)"); 
       	Line("8.阿弥陀佛      :卍 (299jb)"); 
		Line("0.退出商城。=_=             ");
        line("您的选择是:                ");
        cin>>gm;
         if(gm=='1'&&jb<99)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='1') 
         {
            pfd="AW";
            ckpfs++;
            ckpf[ckpfs]="AW";
            jb-=99;
 
         }
 
         if(gm=='2'&&jb<99)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
            else if(gm=='2') 
         {
            pfd="XA";
            ckpfs++;
            ckpf[ckpfs]="XA";
            jb-=99;
         }
          if(gm=='4'&&jb<666)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='4') 
         {
            pfd="┳";
            ckpfs++;
            ckpf[ckpfs]="┳";
            jb-=666;
         }
 
        if(gm=='3'&&jb<99)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='3') 
         {
            pfd="MC";
            ckpfs++;
            ckpf[ckpfs]="MC";
            jb-=99;
 
        }
        if(gm=='5'&&jb<149)//540~590是关于上方增加的皮肤的 
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='5') 
         {
            pfd="se";
            ckpfs++;
            ckpf[ckpfs]="se";
            jb-=149;
 
        }
        if(gm=='6'&&jb<149)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='6') 
         {
            pfd="se";
            ckpfs++;
            ckpf[ckpfs]="se";
            jb-=149;
        }
        if(gm=='7'&&jb<199)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='7') 
         {
            pfd="氼";
            ckpfs++;
            ckpf[ckpfs]="氼";
            jb-=199;
 
        }
        if(gm=='8'&&jb<299)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='8') 
         {
            pfd="卍";
            ckpfs++;
            ckpf[ckpfs]="卍";
            jb-=199;
 
        }
         if(gm=='x'&&jb<99)//591~603加入了一个彩蛋.是致敬行走的 
         {
            cout<<"\n\t\t\t\t\t你发现了隐藏皮肤,但是买不起!"; 
            Sleep(1000);
         }
         else if(gm=='x') 
         {
            pfd="行";
            ckpfs++;
            ckpf[ckpfs]="行";
            jb-=888;
 
         }
         if(gm=='0')
         {
            system("cls");
            return 1;
         }
    }
 
}
int nw(int com){
    //1 定型 
    for(i=0;i<=2047;i++){
        for(j=1;j<=255;j++){
            a[com][1][j][i]=0;
        }
    }
    for(i=1;i<=50;i++) hand[com][i]=0;
    int ke=0;
    cin>>seed;
    srand((unsigned)seed);
    y[com]=1024;
    int top=0,tot=rdm(40,60); 
    for(i=0;i<2048;i++){
        if(i==1024){
            x[com]=tot; 
            do{
                ++x[com];
            }while(a[com][1][x[com]][top]!=0);
            x[com]+=20;
        }
                a[com][1][tot+1][top]=3;
                a[com][1][tot+1][top-3]=3;
                a[com][1][tot+1][top-2]=3;
                a[com][1][tot+1][top-1]=3;
                a[com][1][tot+1][top+1]=3;
                a[com][1][tot+1][top+2]=3;
                a[com][1][tot+1][top+3]=3;
                a[com][1][tot+2][top-3]=3;
                a[com][1][tot+2][top-2]=3;
                a[com][1][tot+2][top]=3;
                a[com][1][tot+2][top-1]=3;
                a[com][1][tot+2][top+1]=3;
                a[com][1][tot+2][top+2]=3;
                a[com][1][tot+2][top+3]=3;
                a[com][1][tot+3][top-2]=3;
                a[com][1][tot+3][top]=3;
                a[com][1][tot+3][top-1]=3;
                a[com][1][tot+3][top+1]=3;
                a[com][1][tot+3][top+2]=3;
                a[com][1][tot+4][top]=3;
                a[com][1][tot+4][top-1]=3;
                a[com][1][tot+4][top+1]=3;
        for(j=tot;j>=0;j--){
            a[com][1][j][top]=3;
        }
        top++;
        int u=rdm(0,10);
        if(u>=9) tot++;
        if(u<=1) tot--;
        if(tot>=256)tot=255;
        if(tot<10) tot=10;
        int uu=rdm(0,8);
    /*  if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && ke+1<top && seed!=1234567890)||(seed==123456789)){
            ke=top;
            a[com][1][tot+1][top]=6;
            a[com][1][tot+2][top]=6;
            a[com][1][tot+3][top]=6;
            int uuu=rdm(0,3);
            if(uuu==1){
                a[com][1][tot+4][top]=6;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+5][top+3]=2;
                a[com][1][tot+6][top-2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
                a[com][1][tot+6][top+2]=2;
                a[com][1][tot+7][top]=2;
                a[com][1][tot+7][top-1]=2;
                a[com][1][tot+7][top+1]=2;
            }else{
                a[com][1][tot+3][top-3]=2;
                a[com][1][tot+3][top-2]=2;
                a[com][1][tot+3][top-1]=2;
                a[com][1][tot+3][top+1]=2;
                a[com][1][tot+3][top+2]=2;
                a[com][1][tot+3][top+3]=2;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
            }
        }*/
    }
    //2  定系
    int u=rdm(1,100),pl=0;
    for(i=1;i<=2048;i++){
        int tot;
        for(j=256;j>=0;j--){
            if(a[com][1][j][i]==3){
                tot=j;
                break;
            }
        }
        if(u<=60){
            a[com][1][tot][i]=1;
            a[com][1][tot-1][i]=4;
            a[com][1][tot-2][i]=4;
            a[com][1][tot-3][i]=4;
            int uu=rdm(0,8);
            if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
                top=i;
                pl=i+1;
            a[com][1][tot+1][top]=6;
            a[com][1][tot+2][top]=6;
            a[com][1][tot+3][top]=6;
            int uuu=rdm(0,3);
            if(uuu==1){
                a[com][1][tot+4][top]=6;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+5][top+3]=2;
                a[com][1][tot+6][top-2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
                a[com][1][tot+6][top+2]=2;
                a[com][1][tot+7][top]=2;
                a[com][1][tot+7][top-1]=2;
                a[com][1][tot+7][top+1]=2;
            }else{
                a[com][1][tot+3][top-3]=2;
                a[com][1][tot+3][top-2]=2;
                a[com][1][tot+3][top-1]=2;
                a[com][1][tot+3][top+1]=2;
                a[com][1][tot+3][top+2]=2;
                a[com][1][tot+3][top+3]=2;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
            }
        }
        }
        else if(u<=80){
            a[com][1][tot][i]=11;
            a[com][1][tot-1][i]=11;
            a[com][1][tot-2][i]=11;
            a[com][1][tot-3][i]=12;
            int uu=rdm(0,8);
            if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
                top=i;
                pl=i+1;
            int uuu=rdm(0,3);
            if(uuu==1){
                a[com][1][tot+1][top]=14;
                a[com][1][tot+2][top]=14;
                a[com][1][tot+3][top]=14;
                a[com][1][tot+4][top]=14;
            }else{
                a[com][1][tot+1][top]=14;
                a[com][1][tot+2][top]=14;
                a[com][1][tot+3][top]=14;
            }
        }
        }
        else{
            a[com][1][tot][i]=13;
            a[com][1][tot-1][i]=4;
            a[com][1][tot-2][i]=4;
            a[com][1][tot-3][i]=4;
            int uu=rdm(0,8);
            if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
                top=i;
                pl=i+1;
            a[com][1][tot+1][top]=15;
            a[com][1][tot+2][top]=15;
            a[com][1][tot+3][top]=15;
            int uuu=rdm(0,3);
            if(uuu==1){
                a[com][1][tot+4][top]=15;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+5][top+3]=2;
                a[com][1][tot+6][top-2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
                a[com][1][tot+6][top+2]=2;
                a[com][1][tot+7][top]=2;
                a[com][1][tot+7][top-1]=2;
                a[com][1][tot+7][top+1]=2;
            }else{
                a[com][1][tot+3][top-3]=2;
                a[com][1][tot+3][top-2]=2;
                a[com][1][tot+3][top-1]=2;
                a[com][1][tot+3][top+1]=2;
                a[com][1][tot+3][top+2]=2;
                a[com][1][tot+3][top+3]=2;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
            }
        }
        }
        if(i%128==0 && i!=1024) u=rdm(1,100);
    } 
    //
    for(i=1;i<=2048;i++){
        for(j=1;j<=16;j++){
            if(a[com][1][j][i]==3){
                int uuu=rdm(1,1000);
                if(uuu<=5){
                    a[com][1][j][i]=7;
                }
            }
        }
        for(j=4;j<=32;j++){
            if(a[com][1][j][i]==3){
                int uuu=rdm(1,1000);
                if(uuu<=10){
                    a[com][1][j][i]=8;
                }
            }
        }
        for(j=1;j<=256;j++){
            if(a[com][1][j][i]==2){
                int uuu=rdm(1,1000);
                if(uuu<=5){
                    int uuuu=rdm(1,1000);
                    if(uuuu>200) a[com][1][j][i]=9;
                    else a[com][1][j][i]=10;
                }
            }
        }
    } 
}
int cun(int com)
{
    while(cmmd!='P' && cmmd!='p'){
        cls();
        for(i=x[com]+10;i>=x[com]-10;i--){
            for(j=y[com]-19;j<=y[com]+19;j++){
                if(i==-1 || j<0 || j>2048){
                    color(15);
                    printf("▓");
                }
                else if(i!=x[com] || j!=y[com]){
                    print(a[com][1][i][j]);
                }else{
                    color(240);
                    cout<<pfd;
                }
            }
            cout<<endl;
        }
        if(x[com]<=1){
            x[com]=1;
        }
        if(x[com]>256){
            x[com]=256;
        }
        if(y[com]<0){
            y[com]=0;
        }
        if(y[com]>2048){
            y[com]=2048;
        }
        color(7);
        printf(">>状态栏<<  坐标: x:%d y:%d  ",x[com],y[com]-1024);//状态栏样子改了 
        cout<<"后位方块:";
        print(a[com][1][x[com]][y[com]]);
        color(7);
        cout<<"  破坏模式:";
        if(kn){
            cout<<"开启"; 
        } else cout<<"关闭";
        cout<<"  P-退出至标题画面";
        cout<<endl;
        color(7);
        cout<<"\t\t\t      ";
        for(i=1;i<=50;i++){
            if(hand[com][i]>0){
                print(i);
            }
        }
        color(7);
        cout<<endl<<"\t\t\t      ";
        for(i=1;i<=50;i++){
            if(hand[com][i]>0){
                printf("%02d",hand[com][i]);
            }
        }
        cmmd=gl();
        if(cmmd=='/'){
            cls();
            color(12);
            Line("命令");
            bool flag=0;
            while(comd!="esc"){ 
                color(7);
                cout<<"/";
                cin>>comd;
                if(comd=="tp"){
                    cout<<"/tp @s ";
                    cin>>i>>j;
                    flag=1;
                    x[com]=i;
                    y[com]=j;
                    comd="esc";
                }
                if(!flag){
                    color(12);
                    cout<<">>语法错误<<"<<endl;
                    color(7);
                }
            }
            comd="?";
        }
        if((cmmd=='W' || cmmd=='w')&& a[com][1][x[com]-1][y[com]]!=0){
            if((a[com][1][x[com]+1][y[com]]==0) && (a[com][1][x[com]+2][y[com]]==0)){
                x[com]+=3;
            }
            if((a[com][1][x[com]+1][y[com]]==0) && (a[com][1][x[com]+2][y[com]]!=0)){
                x[com]+=2;
            }
        }
        //if(cmmd=='S' || cmmd=='s') x[com]--;
        if(a[com][1][x[com]-1][y[com]]==0){
            Sleep(10);
            x[com]--;
        }
        if(cmmd=='A' || cmmd=='a'){
            if(a[com][1][x[com]][y[com]-1]==0 && a[com][1][x[com]-1][y[com]-1]==0){
                x[com]--;
                y[com]--;
            }
            if(a[com][1][x[com]][y[com]-1]==0 && a[com][1][x[com]-1][y[com]-1]!=0){
                y[com]--;
            }
            if(a[com][1][x[com]][y[com]-1]!=0 && a[com][1][x[com]+1][y[com]-1]==0 && a[com][1][x[com]+1][y[com]]==0){
                x[com]++;
                y[com]--;
            }
        } //y[com]--;
        if(cmmd=='D' || cmmd=='d'){
            if(a[com][1][x[com]][y[com]+1]==0 && a[com][1][x[com]-1][y[com]+1]==0){
                x[com]--;
                y[com]++;
            }
            if(a[com][1][x[com]][y[com]+1]==0 && a[com][1][x[com]-1][y[com]+1]!=0){
                y[com]++;
            }
            if(a[com][1][x[com]][y[com]+1]!=0 && a[com][1][x[com]+1][y[com]+1]==0 && a[com][1][x[com]+1][y[com]]==0){
                x[com]++;
                y[com]++;
            }
        } //y[com]++;
        if(cmmd=='J' || cmmd=='j'){
            kn=!kn;
            Sleep(100);
        } 
        if(kn){
            if(cmmd=='Y' || cmmd=='y'){
                hand[com][a[com][1][x[com]+1][y[com]-1]]++;
                a[com][1][x[com]+1][y[com]-1]=0;
            }
            if(cmmd=='U' || cmmd=='u'){
                hand[com][a[com][1][x[com]+1][y[com]]]++;
                a[com][1][x[com]+1][y[com]]=0;
            } 
            if(cmmd=='I' || cmmd=='i'){
                hand[com][a[com][1][x[com]+1][y[com]+1]]++;
                a[com][1][x[com]+1][y[com]+1]=0;
            }
            if(cmmd=='H' || cmmd=='h'){
                hand[com][a[com][1][x[com]][y[com]-1]]++;
                a[com][1][x[com]][y[com]-1]=0;
            }
            if(cmmd=='K' || cmmd=='k'){
                hand[com][a[com][1][x[com]][y[com]+1]]++;
                a[com][1][x[com]][y[com]+1]=0;
            }
            if(cmmd=='B' || cmmd=='b'){
                hand[com][a[com][1][x[com]-1][y[com]-1]]++;
                a[com][1][x[com]-1][y[com]-1]=0;
            }
            if(cmmd=='N' || cmmd=='n'){
                hand[com][a[com][1][x[com]-1][y[com]]]++;
                a[com][1][x[com]-1][y[com]]=0;
            }
            if(cmmd=='M' || cmmd=='m'){
                hand[com][a[com][1][x[com]-1][y[com]+1]]++;
                a[com][1][x[com]-1][y[com]+1]=0;
            }
        }
        color(7);
    }
    cmmd='?';
    return 0;
}
void fm(){
    while(cmmd!='G' && cmmd!='g'){
        system("cls");
        color(240);
        system("cls");
        cout<<endl;
        Line("XACRAFT 2.0");
        cout<<endl<<endl;
        color(249);
        Line(" 开发组团队\n"); 
        color(240);
        Line("创意/营销/策划    王子逸");
        Line("核心程序/外观设计 沙宸安");
        cout<<endl;
        color(249);
        Line(" 特别鸣谢名单\n"); 
        color(240);
        Line(" 注:以上排名不分先后\n");
        cout<<endl;
        Line("吴庞茂旭  武 建 豪  刘 英 杰  杜 文 博  侯 平 仄");
        Line("欧阳语聪  张    帆  赵 逸 凡  赵 奕 帆  陈    曦");
        Line("许 金 夫  江 齐 悦  王 文 博  宣 海 宁  王 子 耀");
        Line("陈 喆 鹏  包 涵 宇  潘 孝 宇  曹 灿 阳  朱 优 扬");
        Line("郑 泓 毅  陈 家 傲            赵 泰 来  秦 子 乐");//冮欢被劝退了 
        color(252);
        cout<<endl;
        Line("注:所有在鸣谢名单上的人可以申请移出,达到光能级别及以上的人可以申请加入。");
        color(240);
        Line("[1/2]");
        Line("G-切换下一页");
        cmmd=getch();
    }
    while(cmmd!='S' && cmmd!='s'){
        system("cls");
        color(240);
        system("cls");
        cout<<endl;
        Line("XACRAFT 2.0");
        cout<<endl<<endl;
        color(249);
        Line(" 本版本更新内容\n"); 
        color(240);
        Line("这是XACRAFT的第2个版本");
        Line("本版本更新内容如下:");
        cout<<endl;
        Line("随机地形生成美化");
        Line("重力场更新");
        Line("加入新生物群系:雪地、沙漠");
        cout<<endl;
        color(252);
        Line(" XACRAFT开发组团队预祝您游玩愉快!\n");
        color(249);
        Line(" 版权声明\n"); 
        color(240);
        Line("本游戏由兴安科技与极昼游戏工坊联合制作");
        Line("版权所有 未经授权严禁转载 保留所有权利");
        Line("Copyright XAscience & JizhouGameWorkshop All Rights Reserved"); 
        cout<<endl; 
        color(240);
        Line("[2/2]");
        Line("S-开始游戏");
        cmmd=getch();
    }
    while(cmmd!='Q' && cmmd!='q'){
        system("cls");
        color(240);
        system("cls");
        if(tecnam.empty()) rightLine("未登录TEC账号  L-登录");
        else rightLine(tecnam+",欢迎您!");
    color(240);
        cout<<"                ▇   ▇    ▇    ▇ ▇ ▇  ▇ ▇ ▇    ▇    ▇ ▇ ▇  ▇ ▇ ▇               "<<endl;
        cout<<"                ▇   ▇  ▇   ▇  ▇      ▇   ▇  ▇   ▇  ▇        ▇                 "<<endl;
        cout<<"                  ▇    ▇ ▇ ▇  ▇      ▇ ▇ ▇  ▇ ▇ ▇  ▇ ▇ ▇    ▇                 "<<endl;
        cout<<"                ▇   ▇  ▇   ▇  ▇      ▇ ▇    ▇   ▇  ▇        ▇                 "<<endl;
        cout<<"                ▇   ▇  ▇   ▇  ▇ ▇ ▇  ▇   ▇  ▇   ▇  ▇        ▇                 "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                           ";
        color(143);
        cout<<"       F-单人游戏       ";
        color(240);
        cout<<"                            "<<endl; 
        cout<<"                                                                               "<<endl;
        cout<<"                           ";
        color(143);
        cout<<"       G-多人游戏       ";
        color(240);
        cout<<"                            "<<endl; 
        cout<<"                                                                               "<<endl;
        cout<<"                           ";
        color(143);
        cout<<"       H-中心商城       ";
        color(240);
        cout<<"                            "<<endl; 
        cout<<"                                                                               "<<endl;
        cout<<"                           ";
        color(143);
        cout<<"  J-教程  ";
        color(240);
        cout<<"    "; 
        color(143);
        cout<<"  Q-退出  ";
        color(240);
        cout<<"                            "<<endl; 
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<" XACRAFT 2.0        Copyright XAscience & JizhouGameWorkshop Do not distribute!";
        cmmd=getch();
        if(cmmd=='F' || cmmd=='f'){
 
            if(jiandang){
                color(7);
                cun(1);
                cmmd='?';
            }else{
                system("cls");
                color(252);
                system("cls");
                Line("我的存档");
                color(240);
                Line("新的世界"); 
                cout<<endl<<endl;
                line("输入种子: ");
                color(7);
                nw(1);
                cun(1);
                cmmd='?';
                jiandang=1;
            }
 
        }
        if(cmmd=='G' || cmmd=='g'){
            system("cls");
            color(252);
            system("cls");
            Line("非常抱歉");
            cout<<endl;
            color(240);
            cout<<"     因为XACRAFT开发组未能掌握联机游戏的技术,所以暂时不能体验多人游戏,给 "<<endl;
            cout<<" 您带来不便,敬请谅解!";
            cout<<endl<<endl<<endl<<endl;
            Line("[按任意键退出]");
            cmmd=getch();
            cmmd='?';
        }
        if(cmmd=='H' || cmmd=='h') shang();
        if(cmmd=='L' || cmmd=='l') TEClogin();
        if(cmmd=='J' || cmmd=='j'){
            system("cls");
            color(240);
            system("cls");
            Line("新手教程");
            cout<<endl;
            color(240);
            Line(" 注:以下键位操作大小写皆可\n");
            Line(" W-跳    跃   A-左    走   D-右    走\n");
            Line(" J-打开/关闭破坏模式\n");
            Line(" YUIHKBNM 依次为:破坏{左上角,上方,右上角,左边,右边,左下角,下方,右下角}的方块\n");
            Line(" 游戏区域的正下方会统计您破坏的方块\n");
            cout<<endl<<endl<<endl<<endl;
            Line("[按任意键退出]");
            cmmd=getch();
            cmmd='?';
        }
        if(cmmd=='#'){
            system("cls");
            color(12);
            system("cls");
            Line("除错模式");
            cout<<endl;
            color(7);
            Line("注:本模式仅供XACRAFT内部人员使用,如果您不是XACRAFT技术人员,在使用XACRAFT除错模式后因操作不当出现问题,兴安科技和极昼工坊将不承担任何责任。");
            cout<<endl<<endl;
            cout<<"方块外观:";
            for(i=1;i<=35;i++){
                print(i);
                color(7);
            }
            color(7);
            cout<<endl<<"方块UI值:";
            for(i=1;i<=35;i++){
                if(i%2==1) color(9);
                printf("%02d",i);
                color(7);
            }
            cout<<endl<<endl<<endl;
            Line("[按任意键退出]");
            cmmd=getch();
            cmmd='?';
        }
    }
    Sleep(1000);
    return ;
}
int main(){
    HideCursor();
    console();
    Logical_Lock();
    fm();
    return 0;
}

 

李玥仑在2021-07-23 14:23:07追加了内容

@沙宸安 @飞速小程序开发商 @王子逸 

如不同意,我立即发帖说明并结贴

李玥仑在2021-07-24 11:00:45追加了内容
#include<iostream>
#include<fstream> 
#include<windows.h>
#include<cstdio>
#include<cstring>
#include<stdio.h>
#include<conio.h>
#include<time.h>
#include<vector> 
#include<sstream>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0) 
using namespace std;
string ckpf[10001];//仓库的皮肤 
bool jiandang=0;//临时变量 
int ckpfs=1;// 仓库的皮肤数量 
void HideCursor(){
    HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_CURSOR_INFO CursorInfo;
    GetConsoleCursorInfo(handle, &CursorInfo);//获取控制台光标信息
    CursorInfo.bVisible = false; //隐藏控制台光标
    SetConsoleCursorInfo(handle, &CursorInfo);//设置控制台光标状态
}
void console()
{
    HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);  
    CONSOLE_SCREEN_BUFFER_INFO bInfo; 
    GetConsoleScreenBufferInfo(hOut, &bInfo );  
    SetConsoleTitle("XACRAFT 2.0 简体中文版"); // 设置窗口的标题
}
string pfd="XZ";//皮肤 
long long jb=100;//金币数量 
int a[20][5][256][2049],hand[20][50],x[20]={0},y[20];
int i,j,errortimes=0;
bool kn=0;
char cmmd;
string comd;
string tecpas,tecnam,tecpin;
char ch;
int seed;
void color(int corcorcor){
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),corcorcor);
}
bool kd(char ccc){
    if(!KEY_DOWN(ccc)) return 0;
    else return 1;
}
int rdm(int aaaaa,int bbbbb){
    return rand()%(bbbbb-aaaaa+1)+aaaaa;
}
void cls(){//赟刑道提供,如有侵权请联系删除。    
    HANDLE hConsole = GetStdHandle(STD_OUTPUT_HANDLE);
    COORD coordScreen = { 0, 0 };    // home for the cursor
    SetConsoleCursorPosition( hConsole, coordScreen );
}
char gl(){
    if(kd('Q')) return 'Q';
    if(kd('W')) return 'W';
    if(kd('E')) return 'E';
    if(kd('R')) return 'R';
    if(kd('T')) return 'T';
    if(kd('Y')) return 'Y';
    if(kd('U')) return 'U';
    if(kd('I')) return 'I';
    if(kd('O')) return 'O';
    if(kd('P')) return 'P';
    if(kd('A')) return 'A';
    if(kd('S')) return 'S';
    if(kd('D')) return 'D';
    if(kd('F')) return 'F';
    if(kd('G')) return 'G';
    if(kd('H')) return 'H';
    if(kd('J')) return 'J';
    if(kd('K')) return 'K';
    if(kd('L')) return 'L';
    if(kd('Z')) return 'Z';
    if(kd('X')) return 'X';
    if(kd('C')) return 'C';
    if(kd('V')) return 'V';
    if(kd('B')) return 'B';
    if(kd('N')) return 'N';
    if(kd('M')) return 'M';
    if(kd('1')) return '1';
    if(kd('2')) return '2';
    if(kd('3')) return '3';
    if(kd('4')) return '4';
    if(kd('5')) return '5';
    if(kd('6')) return '6';
    if(kd('7')) return '7';
    if(kd('8')) return '8';
    if(kd('9')) return '9';
    if(kd('0')) return '0';
}
string getTime(){
    time_t timep;
    time (&timep);
    char tmp[64];
    strftime(tmp, sizeof(tmp), "%m%d",localtime(&timep) );
    return tmp;
}
string GetTime(){
    time_t timep;
    time (&timep);
    char tmp[64];
    strftime(tmp, sizeof(tmp), "%Y%m%d",localtime(&timep) );
    return tmp;
}
void rightLine(string str){
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<80-l;i++)
    cout<<" ";
    cout<<str<<endl;
    return ;
}
void Line(string str){
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<(w-l)/2;i++)
    cout<<" ";
    cout<<str<<endl;
    return ;
}
void line(string str){
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<(w-l)/2;i++)
    cout<<" ";
    cout<<str;
    return ;
}
void lin(string str){
    int i,l,w;
    w=80;
    l=str.length();
    for(i=0;i<(w-l)/2;i++)
    cout<<" ";
    cout<<str;
    return ;
}
void nameline(string str){
    int i,l,w;
    w=50;
    l=str.length();
    for(i=0;i<(w-l)/2-1;i++)
    cout<<" ";
    cout<<str;
    if((w-l)%2==0){
        for(i=0;i<(w-l)/2-1;i++)
        cout<<" ";
    }else{
        for(i=0;i<(w-l)/2;i++)
        cout<<" ";
    }
    color(7);
    cout<<"|";
    return ;
}
void passline(string str){
    int i,l,w;
    w=50;
    l=str.length();
    for(i=0;i<(w-l)/2-1;i++)
    cout<<" ";
    for(i=0;i<str.length();i++) cout<<"*";
    if((w-l)%2==0){
        for(i=0;i<(w-l)/2-1;i++)
        cout<<" ";
    }else{
        for(i=0;i<(w-l)/2;i++)
        cout<<" ";
    }
    color(7);
    cout<<"|";
    return ;
}
bool Login_getpass(){
    errortimes=0;
    cp:;
    if(errortimes>=3){
        color(13);
        cout<<endl;
        lin("错误次数过多,登录失败!");
        Sleep(3000);
        color(7);
        return 0;
    }
    tecpin="";
    ch=0;
    while(ch!=13){
        system("cls");
        color(14);
        cout<<endl;
        lin("登录 TEC 账号");
        printf("\n\n\n\n\n\n");
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |";
        color(11);
        nameline("欢迎回来,"+tecnam);
        cout<<endl;
        lin("==================================================");
        printf("\n\n\n");
        color(10);
        cout<<"               >>输入密码<<";
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |";
        passline(tecpin);
        cout<<endl;
        lin("==================================================");
        ch=_getch();
        tecpin+=ch;
        if(ch==8){
            tecpin=tecpin.substr(0,tecpin.length()-1);
            tecpin=tecpin.substr(0,tecpin.length()-1);
        }
    }
    stringstream in1;
    in1<<tecpin;
    in1>>tecpin;
    if(tecpin!=tecpas){
        cout<<endl;
        color(12);
        lin("密码错误");
        errortimes++;
        Sleep(1500);
        goto cp;
    }
    system("cls");
    return 1;
} 
void getnam(){
    tecpin="";
    ch=0;
    while(ch!=13){
        system("cls");
        color(14);
        cout<<endl;
        lin("注册 TEC 账号");
        printf("\n\n\n\n\n\n");
        color(10);
        cout<<"               >>用户名<<";
        color(15);
        cout<<"  {请输入}"; 
        if(tecpin.length()>45){
            color(12);
            cout<<"   用户名过长";
            tecpin=tecpin.substr(0,tecpin.length()-1);
        }
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |";
        nameline(tecpin);
        cout<<endl;
        lin("==================================================");
        printf("\n\n\n");
        color(10);
        cout<<"               >>密码<<";
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |                                                |";
        cout<<endl;
        lin("==================================================");
        ch=_getch();
        tecpin+=ch;
        if(ch==8){
            tecpin=tecpin.substr(0,tecpin.length()-1);
            tecpin=tecpin.substr(0,tecpin.length()-1);
        }
    }
    system("cls");
    stringstream in1;
    in1<<tecpin;
    in1>>tecnam;
    if(tecnam.length()==0) getnam();
    return ;
}
void getpas(){
    tecpin="";
    ch=0;
    while(ch!=13){
        system("cls");
        color(14);
        cout<<endl;
        lin("注册 TEC 账号");
        printf("\n\n\n\n\n\n");
        color(10);
        cout<<"               >>用户名<< 输入完成 √";//改了  >>用户名<<
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |";
        nameline(tecnam);
        cout<<endl;
        lin("==================================================");
        printf("\n\n\n");
        color(10);
        cout<<"               >>密码<<";//改了>>密码<< 
        color(15);
        cout<<"  {请输入}"; 
        if(tecpin.length()>45){
            color(12);
            cout<<"   密码过长";
            tecpin=tecpin.substr(0,tecpin.length()-1);
        }
        color(7);
        cout<<endl;
        lin("==================================================");
        cout<<endl;
        cout<<"               |";
        passline(tecpin);
        cout<<endl;
        lin("==================================================");
        ch=_getch();
        tecpin+=ch;
        if(ch==8){
            tecpin=tecpin.substr(0,tecpin.length()-1);
            tecpin=tecpin.substr(0,tecpin.length()-1);
        }
    }
    system("cls");
    tecpas=tecpin;
    if(tecpas.length()==0) getpas();
    return ;
}
void TEClogin(){
    color(7);
    ifstream fin("TEC账户.tecdata");
    fin>>tecnam>>tecpas;
    fin.close();
    if(tecnam.length()!=0 && tecpas.length()!=0){
        if(Login_getpass()==0){
            i=0;
            cout<<0/i;
        }
        return ;
    } 
    getnam();
    getpas();   
    ofstream fout("TEC账户.tecdata");
    fout<<tecnam<<endl<<tecpas;
    fout.close();
    return ;    
}
//逻辑锁部分(始)
bool end_day(){
    string tmp=GetTime(),temp="20220101";
    if(tmp>=temp) return 1;
    else return 0;
}
bool fool_days(){
    string tmp=getTime();
    if(tmp=="0401") return 1;
    else return 0;
} 
//逻辑锁部分(终) 
void Logical_Lock(){
    if(fool_days()){
        system("cls");
        color(252);
        system("cls");
        cout<<endl;
        Line("抱    歉");
        cout<<endl<<endl;
        color(240);
        Line("出于特殊原因,XACRAFT已停止更新,非常抱歉。");
        cmmd=getch();
        int fk=0;
        cout<<fk/fk;
    }
    if(end_day()){
        system("cls");
        color(252);
        system("cls");
        cout<<endl;
        Line("XACRAFT 版本过低");
        cout<<endl<<endl;
        color(240);
        Line("您现在使用的XACRAFT 2.0已于2022年1月1日过期,请更新至最新版本!");
        cmmd=getch();
        int fk=0;
        cout<<fk/fk;
    }
    return ;
}
int print(int cor){
    if(cor==1){
        color(170);//草方块 
        printf("▉ ");
    }
    else if(cor==2){
        color(34);//树叶 
        printf("▉ ");
    }
    else if(cor==3){
        color(136);//石头 
        printf("▉ ");
    }
    else if(cor==4){
        color(102);//泥土 
        printf("▉ ");
    }
    else if(cor==6){
        color(96);//橡木 
        printf("Wd");//wood
    }
    else if(cor==7){
        color(139);//钻石矿石 
        printf("∷");
    }
    else if(cor==8){
        color(142);//黄金矿石 
        printf("∷");
    }else if(cor==9){
        color(207);//苹果 
        printf("AP");
    }else if(cor==10){
        color(239);//金苹果 
        printf("GA");
    }else if(cor==11){ 
        color(238);//沙子 
        printf("▉ ");
    }else if(cor==12){
        color(239);//砂岩 
        printf("==");
    }else if(cor==13){
        color(127);//雪块
        printf("▓ ");
    }else if(cor==14){
        color(32);//仙人掌 
        printf("∷");
    }else if(cor==15){
        color(112);//白桦木
        printf("BR"); 
    }else{
        color(255);//空气 
        cout<<"  ";
    }
}
int cangk()
{
    cout<<"\n\n\n\n\n";
    cout<<"\t\t你现在所拥有的皮肤:";
    for(int i=1;i<=ckpfs;i++)
    {
        cout<<ckpfs<<"."<<ckpf[ckpfs]<<"  ";
     } 
     int bixk;
     cin>>bixk;
     pfd=ckpf[ckpfs];
     cout<<"\n\t\t\t\t\t装备成功!";
     Sleep(1000);
     return 1; 
}
int shang()//本市最繁华的商城 
{
    char gm;
    while(1)
    {
        system("cls");
        Line("此部分由极昼工坊制作");
        cout<<"\n\n\n\n\n";
        line("你现在有:");
        cout<<jb<<"jb\n";
        Line("1.行走纪念皮肤  :AW  (99jb) ");
        Line("2.XA系统纪念皮肤:XA  (99jb) ");
        Line("3.MC致敬皮肤    :MC  (99jb) ");
        Line("4.首发纪念皮肤  :┳  (666jb)");
       	Line("5.Steve         :se (149jb)"); //增加了481~484 
       	Line("6.Alex          :ae (149jb)"); 
       	Line("7.水贴国纪念皮肤:氼 (199jb)"); 
       	Line("8.阿弥陀佛      :卍 (299jb)"); 
		Line("0.退出商城。=_=             ");
        line("您的选择是:                ");
        cin>>gm;
         if(gm=='1'&&jb<99)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='1') 
         {
            pfd="AW";
            ckpfs++;
            ckpf[ckpfs]="AW";
            jb-=99;
 
         }
 
         if(gm=='2'&&jb<99)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
            else if(gm=='2') 
         {
            pfd="XA";
            ckpfs++;
            ckpf[ckpfs]="XA";
            jb-=99;
         }
          if(gm=='4'&&jb<666)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='4') 
         {
            pfd="┳";
            ckpfs++;
            ckpf[ckpfs]="┳";
            jb-=666;
         }
 
        if(gm=='3'&&jb<99)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='3') 
         {
            pfd="MC";
            ckpfs++;
            ckpf[ckpfs]="MC";
            jb-=99;
 
        }
        if(gm=='5'&&jb<149)//540~590是关于上方增加的皮肤的 
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='5') 
         {
            pfd="se";
            ckpfs++;
            ckpf[ckpfs]="se";
            jb-=149;
 
        }
        if(gm=='6'&&jb<149)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='6') 
         {
            pfd="se";
            ckpfs++;
            ckpf[ckpfs]="se";
            jb-=149;
        }
        if(gm=='7'&&jb<199)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='7') 
         {
            pfd="氼";
            ckpfs++;
            ckpf[ckpfs]="氼";
            jb-=199;
 
        }
        if(gm=='8'&&jb<299)
         {
            cout<<"\n\t\t\t\t\t买不起!"; 
            Sleep(1000);
         }
         else if(gm=='8') 
         {
            pfd="卍";
            ckpfs++;
            ckpf[ckpfs]="卍";
            jb-=199;
 
        }
         if(gm=='x'&&jb<99)//591~603加入了一个彩蛋.是致敬行走的 
         {
            cout<<"\n\t\t\t\t\t你发现了隐藏皮肤,但是买不起!"; 
            Sleep(1000);
         }
         else if(gm=='x') 
         {
            pfd="行";
            ckpfs++;
            ckpf[ckpfs]="行";
            jb-=888;
 
         }
         if(gm=='0')
         {
            system("cls");
            return 1;
         }
    }
 
}
int nw(int com){
    //1 定型 
    for(i=0;i<=2047;i++){
        for(j=1;j<=255;j++){
            a[com][1][j][i]=0;
        }
    }
    for(i=1;i<=50;i++) hand[com][i]=0;
    int ke=0;
    cin>>seed;
    srand((unsigned)seed);
    y[com]=1024;
    int top=0,tot=rdm(40,60); 
    for(i=0;i<2048;i++){
        if(i==1024){
            x[com]=tot; 
            do{
                ++x[com];
            }while(a[com][1][x[com]][top]!=0);
            x[com]+=20;
        }
                a[com][1][tot+1][top]=3;
                a[com][1][tot+1][top-3]=3;
                a[com][1][tot+1][top-2]=3;
                a[com][1][tot+1][top-1]=3;
                a[com][1][tot+1][top+1]=3;
                a[com][1][tot+1][top+2]=3;
                a[com][1][tot+1][top+3]=3;
                a[com][1][tot+2][top-3]=3;
                a[com][1][tot+2][top-2]=3;
                a[com][1][tot+2][top]=3;
                a[com][1][tot+2][top-1]=3;
                a[com][1][tot+2][top+1]=3;
                a[com][1][tot+2][top+2]=3;
                a[com][1][tot+2][top+3]=3;
                a[com][1][tot+3][top-2]=3;
                a[com][1][tot+3][top]=3;
                a[com][1][tot+3][top-1]=3;
                a[com][1][tot+3][top+1]=3;
                a[com][1][tot+3][top+2]=3;
                a[com][1][tot+4][top]=3;
                a[com][1][tot+4][top-1]=3;
                a[com][1][tot+4][top+1]=3;
        for(j=tot;j>=0;j--){
            a[com][1][j][top]=3;
        }
        top++;
        int u=rdm(0,10);
        if(u>=9) tot++;
        if(u<=1) tot--;
        if(tot>=256)tot=255;
        if(tot<10) tot=10;
        int uu=rdm(0,8);
    /*  if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && ke+1<top && seed!=1234567890)||(seed==123456789)){
            ke=top;
            a[com][1][tot+1][top]=6;
            a[com][1][tot+2][top]=6;
            a[com][1][tot+3][top]=6;
            int uuu=rdm(0,3);
            if(uuu==1){
                a[com][1][tot+4][top]=6;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+5][top+3]=2;
                a[com][1][tot+6][top-2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
                a[com][1][tot+6][top+2]=2;
                a[com][1][tot+7][top]=2;
                a[com][1][tot+7][top-1]=2;
                a[com][1][tot+7][top+1]=2;
            }else{
                a[com][1][tot+3][top-3]=2;
                a[com][1][tot+3][top-2]=2;
                a[com][1][tot+3][top-1]=2;
                a[com][1][tot+3][top+1]=2;
                a[com][1][tot+3][top+2]=2;
                a[com][1][tot+3][top+3]=2;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
            }
        }*/
    }
    //2  定系
    int u=rdm(1,100),pl=0;
    for(i=1;i<=2048;i++){
        int tot;
        for(j=256;j>=0;j--){
            if(a[com][1][j][i]==3){
                tot=j;
                break;
            }
        }
        if(u<=60){
            a[com][1][tot][i]=1;
            a[com][1][tot-1][i]=4;
            a[com][1][tot-2][i]=4;
            a[com][1][tot-3][i]=4;
            int uu=rdm(0,8);
            if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
                top=i;
                pl=i+1;
            a[com][1][tot+1][top]=6;
            a[com][1][tot+2][top]=6;
            a[com][1][tot+3][top]=6;
            int uuu=rdm(0,3);
            if(uuu==1){
                a[com][1][tot+4][top]=6;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+5][top+3]=2;
                a[com][1][tot+6][top-2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
                a[com][1][tot+6][top+2]=2;
                a[com][1][tot+7][top]=2;
                a[com][1][tot+7][top-1]=2;
                a[com][1][tot+7][top+1]=2;
            }else{
                a[com][1][tot+3][top-3]=2;
                a[com][1][tot+3][top-2]=2;
                a[com][1][tot+3][top-1]=2;
                a[com][1][tot+3][top+1]=2;
                a[com][1][tot+3][top+2]=2;
                a[com][1][tot+3][top+3]=2;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
            }
        }
        }
        else if(u<=80){
            a[com][1][tot][i]=11;
            a[com][1][tot-1][i]=11;
            a[com][1][tot-2][i]=11;
            a[com][1][tot-3][i]=12;
            int uu=rdm(0,8);
            if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
                top=i;
                pl=i+1;
            int uuu=rdm(0,3);
            if(uuu==1){
                a[com][1][tot+1][top]=14;
                a[com][1][tot+2][top]=14;
                a[com][1][tot+3][top]=14;
                a[com][1][tot+4][top]=14;
            }else{
                a[com][1][tot+1][top]=14;
                a[com][1][tot+2][top]=14;
                a[com][1][tot+3][top]=14;
            }
        }
        }
        else{
            a[com][1][tot][i]=13;
            a[com][1][tot-1][i]=4;
            a[com][1][tot-2][i]=4;
            a[com][1][tot-3][i]=4;
            int uu=rdm(0,8);
            if((uu==6 && i>4 && i<2045 && i!=1023 && i!=1024 && i!=1025 && pl<i && seed!=1234567890)||(seed==123456789)){
                top=i;
                pl=i+1;
            a[com][1][tot+1][top]=15;
            a[com][1][tot+2][top]=15;
            a[com][1][tot+3][top]=15;
            int uuu=rdm(0,3);
            if(uuu==1){
                a[com][1][tot+4][top]=15;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+5][top+3]=2;
                a[com][1][tot+6][top-2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
                a[com][1][tot+6][top+2]=2;
                a[com][1][tot+7][top]=2;
                a[com][1][tot+7][top-1]=2;
                a[com][1][tot+7][top+1]=2;
            }else{
                a[com][1][tot+3][top-3]=2;
                a[com][1][tot+3][top-2]=2;
                a[com][1][tot+3][top-1]=2;
                a[com][1][tot+3][top+1]=2;
                a[com][1][tot+3][top+2]=2;
                a[com][1][tot+3][top+3]=2;
                a[com][1][tot+4][top-3]=2;
                a[com][1][tot+4][top-2]=2;
                a[com][1][tot+4][top]=2;
                a[com][1][tot+4][top-1]=2;
                a[com][1][tot+4][top+1]=2;
                a[com][1][tot+4][top+2]=2;
                a[com][1][tot+4][top+3]=2;
                a[com][1][tot+5][top-2]=2;
                a[com][1][tot+5][top]=2;
                a[com][1][tot+5][top-1]=2;
                a[com][1][tot+5][top+1]=2;
                a[com][1][tot+5][top+2]=2;
                a[com][1][tot+6][top]=2;
                a[com][1][tot+6][top-1]=2;
                a[com][1][tot+6][top+1]=2;
            }
        }
        }
        if(i%128==0 && i!=1024) u=rdm(1,100);
    } 
    //
    for(i=1;i<=2048;i++){
        for(j=1;j<=16;j++){
            if(a[com][1][j][i]==3){
                int uuu=rdm(1,1000);
                if(uuu<=5){
                    a[com][1][j][i]=7;
                }
            }
        }
        for(j=4;j<=32;j++){
            if(a[com][1][j][i]==3){
                int uuu=rdm(1,1000);
                if(uuu<=10){
                    a[com][1][j][i]=8;
                }
            }
        }
        for(j=1;j<=256;j++){
            if(a[com][1][j][i]==2){
                int uuu=rdm(1,1000);
                if(uuu<=5){
                    int uuuu=rdm(1,1000);
                    if(uuuu>200) a[com][1][j][i]=9;
                    else a[com][1][j][i]=10;
                }
            }
        }
    } 
}
int cun(int com)
{
    while(cmmd!='P' && cmmd!='p'){
        cls();
        for(i=x[com]+10;i>=x[com]-10;i--){
            for(j=y[com]-19;j<=y[com]+19;j++){
                if(i==-1 || j<0 || j>2048){
                    color(15);
                    printf("▓");
                }
                else if(i!=x[com] || j!=y[com]){
                    print(a[com][1][i][j]);
                }else{
                    color(240);
                    cout<<pfd;
                }
            }
            cout<<endl;
        }
        if(x[com]<=1){
            x[com]=1;
        }
        if(x[com]>256){
            x[com]=256;
        }
        if(y[com]<0){
            y[com]=0;
        }
        if(y[com]>2048){
            y[com]=2048;
        }
        color(7);
        printf(">>状态栏<<  坐标: x:%d y:%d  ",x[com],y[com]-1024);//状态栏样子改了 
        cout<<"后位方块:";
        print(a[com][1][x[com]][y[com]]);
        color(7);
        cout<<"  破坏模式:";
        if(kn){
            cout<<"开启"; 
        } else cout<<"关闭";
        cout<<"  P-退出至标题画面";
        cout<<endl;
        color(7);
        cout<<"\t\t\t      ";
        for(i=1;i<=50;i++){
            if(hand[com][i]>0){
                print(i);
            }
        }
        color(7);
        cout<<endl<<"\t\t\t      ";
        for(i=1;i<=50;i++){
            if(hand[com][i]>0){
                printf("%02d",hand[com][i]);
            }
        }
        cmmd=gl();
        if(cmmd=='/'){
            cls();
            color(12);
            Line("命令");
            bool flag=0;
            while(comd!="esc"){ 
                color(7);
                cout<<"/";
                cin>>comd;
                if(comd=="tp"){
                    cout<<"/tp @s ";
                    cin>>i>>j;
                    flag=1;
                    x[com]=i;
                    y[com]=j;
                    comd="esc";
                }
                if(!flag){
                    color(12);
                    cout<<">>语法错误<<"<<endl;
                    color(7);
                }
            }
            comd="?";
        }
        if((cmmd=='W' || cmmd=='w')&& a[com][1][x[com]-1][y[com]]!=0){
            if((a[com][1][x[com]+1][y[com]]==0) && (a[com][1][x[com]+2][y[com]]==0)){
                x[com]+=3;
            }
            if((a[com][1][x[com]+1][y[com]]==0) && (a[com][1][x[com]+2][y[com]]!=0)){
                x[com]+=2;
            }
        }
        //if(cmmd=='S' || cmmd=='s') x[com]--;
        if(a[com][1][x[com]-1][y[com]]==0){
            Sleep(10);
            x[com]--;
        }
        if(cmmd=='A' || cmmd=='a'){
            if(a[com][1][x[com]][y[com]-1]==0 && a[com][1][x[com]-1][y[com]-1]==0){
                x[com]--;
                y[com]--;
            }
            if(a[com][1][x[com]][y[com]-1]==0 && a[com][1][x[com]-1][y[com]-1]!=0){
                y[com]--;
            }
            if(a[com][1][x[com]][y[com]-1]!=0 && a[com][1][x[com]+1][y[com]-1]==0 && a[com][1][x[com]+1][y[com]]==0){
                x[com]++;
                y[com]--;
            }
        } //y[com]--;
        if(cmmd=='D' || cmmd=='d'){
            if(a[com][1][x[com]][y[com]+1]==0 && a[com][1][x[com]-1][y[com]+1]==0){
                x[com]--;
                y[com]++;
            }
            if(a[com][1][x[com]][y[com]+1]==0 && a[com][1][x[com]-1][y[com]+1]!=0){
                y[com]++;
            }
            if(a[com][1][x[com]][y[com]+1]!=0 && a[com][1][x[com]+1][y[com]+1]==0 && a[com][1][x[com]+1][y[com]]==0){
                x[com]++;
                y[com]++;
            }
        } //y[com]++;
        if(cmmd=='J' || cmmd=='j'){
            kn=!kn;
            Sleep(100);
        } 
        if(kn){
            if(cmmd=='Y' || cmmd=='y'){
                hand[com][a[com][1][x[com]+1][y[com]-1]]++;
                a[com][1][x[com]+1][y[com]-1]=0;
            }
            if(cmmd=='U' || cmmd=='u'){
                hand[com][a[com][1][x[com]+1][y[com]]]++;
                a[com][1][x[com]+1][y[com]]=0;
            } 
            if(cmmd=='I' || cmmd=='i'){
                hand[com][a[com][1][x[com]+1][y[com]+1]]++;
                a[com][1][x[com]+1][y[com]+1]=0;
            }
            if(cmmd=='H' || cmmd=='h'){
                hand[com][a[com][1][x[com]][y[com]-1]]++;
                a[com][1][x[com]][y[com]-1]=0;
            }
            if(cmmd=='K' || cmmd=='k'){
                hand[com][a[com][1][x[com]][y[com]+1]]++;
                a[com][1][x[com]][y[com]+1]=0;
            }
            if(cmmd=='B' || cmmd=='b'){
                hand[com][a[com][1][x[com]-1][y[com]-1]]++;
                a[com][1][x[com]-1][y[com]-1]=0;
            }
            if(cmmd=='N' || cmmd=='n'){
                hand[com][a[com][1][x[com]-1][y[com]]]++;
                a[com][1][x[com]-1][y[com]]=0;
            }
            if(cmmd=='M' || cmmd=='m'){
                hand[com][a[com][1][x[com]-1][y[com]+1]]++;
                a[com][1][x[com]-1][y[com]+1]=0;
            }
        }
        color(7);
    }
    cmmd='?';
    return 0;
}
void fm(){
    while(cmmd!='G' && cmmd!='g'){
        system("cls");
        color(240);
        system("cls");
        cout<<endl;
        Line("XACRAFT 2.0");
        cout<<endl<<endl;
        color(249);
        Line(" 开发组团队\n"); 
        color(240);
        Line("创意/营销/策划    王子逸");
        Line("核心程序/外观设计 沙宸安");
        cout<<endl;
        color(249);
        Line(" 特别鸣谢名单\n"); 
        color(240);
        Line(" 注:以上排名不分先后\n");
        cout<<endl;
        Line("吴庞茂旭  武 建 豪  刘 英 杰  杜 文 博  侯 平 仄");
        Line("欧阳语聪  张    帆  赵 逸 凡  赵 奕 帆  陈    曦");
        Line("许 金 夫  江 齐 悦  王 文 博  宣 海 宁  王 子 耀");
        Line("陈 喆 鹏  包 涵 宇  潘 孝 宇  曹 灿 阳  朱 优 扬");
        Line("郑 泓 毅  陈 家 傲            赵 泰 来  秦 子 乐");//冮欢被劝退了 
        color(252);
        cout<<endl;
        Line("注:所有在鸣谢名单上的人可以申请移出,达到光能级别及以上的人可以申请加入。");
        color(240);
        Line("[1/2]");
        Line("G-切换下一页");
        cmmd=getch();
    }
    while(cmmd!='S' && cmmd!='s'){
        system("cls");
        color(240);
        system("cls");
        cout<<endl;
        Line("XACRAFT 2.0");
        cout<<endl<<endl;
        color(249);
        Line(" 本版本更新内容\n"); 
        color(240);
        Line("这是XACRAFT的第2个版本");
        Line("本版本更新内容如下:");
        cout<<endl;
        Line("随机地形生成美化");
        Line("重力场更新");
        Line("加入新生物群系:雪地、沙漠");
        cout<<endl;
        color(252);
        Line(" XACRAFT开发组团队预祝您游玩愉快!\n");
        color(249);
        Line(" 版权声明\n"); 
        color(240);
        Line("本游戏由兴安科技与极昼游戏工坊联合制作");
        Line("版权所有 未经授权严禁转载 保留所有权利");
        Line("Copyright XAscience & JizhouGameWorkshop All Rights Reserved"); 
        cout<<endl; 
        color(240);
        Line("[2/2]");
        Line("S-开始游戏");
        cmmd=getch();
    }
    while(cmmd!='Q' && cmmd!='q'){
        system("cls");
        color(240);
        system("cls");
        if(tecnam.empty()) rightLine("未登录TEC账号  L-登录");
        else rightLine(tecnam+",欢迎您!");
    color(240);
        cout<<"                ▇   ▇    ▇    ▇ ▇ ▇  ▇ ▇ ▇    ▇    ▇ ▇ ▇  ▇ ▇ ▇               "<<endl;
        cout<<"                ▇   ▇  ▇   ▇  ▇      ▇   ▇  ▇   ▇  ▇        ▇                 "<<endl;
        cout<<"                  ▇    ▇ ▇ ▇  ▇      ▇ ▇ ▇  ▇ ▇ ▇  ▇ ▇ ▇    ▇                 "<<endl;
        cout<<"                ▇   ▇  ▇   ▇  ▇      ▇ ▇    ▇   ▇  ▇        ▇                 "<<endl;
        cout<<"                ▇   ▇  ▇   ▇  ▇ ▇ ▇  ▇   ▇  ▇   ▇  ▇        ▇                 "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                           ";
        color(143);
        cout<<"       F-单人游戏       ";
        color(240);
        cout<<"                            "<<endl; 
        cout<<"                                                                               "<<endl;
        cout<<"                           ";
        color(143);
        cout<<"       G-多人游戏       ";
        color(240);
        cout<<"                            "<<endl; 
        cout<<"                                                                               "<<endl;
        cout<<"                           ";
        color(143);
        cout<<"       H-中心商城       ";
        color(240);
        cout<<"                            "<<endl; 
        cout<<"                                                                               "<<endl;
        cout<<"                           ";
        color(143);
        cout<<"  J-教程  ";
        color(240);
        cout<<"    "; 
        color(143);
        cout<<"  Q-退出  ";
        color(240);
        cout<<"                            "<<endl; 
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<"                                                                               "<<endl;
        cout<<" XACRAFT 2.0        Copyright XAscience & JizhouGameWorkshop Do not distribute!";
        cmmd=getch();
        if(cmmd=='F' || cmmd=='f'){
 
            if(jiandang){
                color(7);
                cun(1);
                cmmd='?';
            }else{
                system("cls");
                color(252);
                system("cls");
                Line("我的存档");
                color(240);
                Line("新的世界"); 
                cout<<endl<<endl;
                line("输入种子: ");
                color(7);
                nw(1);
                cun(1);
                cmmd='?';
                jiandang=1;
            }
 
        }
        if(cmmd=='G' || cmmd=='g'){
            system("cls");
            color(252);
            system("cls");
            Line("非常抱歉");
            cout<<endl;
            color(240);
            cout<<"     因为XACRAFT开发组未能掌握联机游戏的技术,所以暂时不能体验多人游戏,给 "<<endl;
            cout<<" 您带来不便,敬请谅解!";
            cout<<endl<<endl<<endl<<endl;
            Line("[按任意键退出]");
            cmmd=getch();
            cmmd='?';
        }
        if(cmmd=='H' || cmmd=='h') shang();
        if(cmmd=='L' || cmmd=='l') TEClogin();
        if(cmmd=='J' || cmmd=='j'){
            system("cls");
            color(240);
            system("cls");
            Line("新手教程");
            cout<<endl;
            color(240);
            Line(" 注:以下键位操作大小写皆可\n");
            Line(" W-跳    跃   A-左    走   D-右    走\n");
            Line(" J-打开/关闭破坏模式\n");
            Line(" YUIHKBNM 依次为:破坏{左上角,上方,右上角,左边,右边,左下角,下方,右下角}的方块\n");
            Line(" 游戏区域的正下方会统计您破坏的方块\n");
            cout<<endl<<endl<<endl<<endl;
            Line("[按任意键退出]");
            cmmd=getch();
            cmmd='?';
        }
        if(cmmd=='#'){
            system("cls");
            color(12);
            system("cls");
            Line("除错模式");
            cout<<endl;
            color(7);
            Line("注:本模式仅供XACRAFT内部人员使用,如果您不是XACRAFT技术人员,在使用XACRAFT除错模式后因操作不当出现问题,兴安科技和极昼工坊将不承担任何责任。");
            cout<<endl<<endl;
            cout<<"方块外观:";
            for(i=1;i<=35;i++){
                print(i);
                color(7);
            }
            color(7);
            cout<<endl<<"方块UI值:";
            for(i=1;i<=35;i++){
                if(i%2==1) color(9);
                printf("%02d",i);
                color(7);
            }
            cout<<endl<<endl<<endl;
            Line("[按任意键退出]");
            cmmd=getch();
            cmmd='?';
        }
    }
    Sleep(1000);
    return ;
}
int main(){
    HideCursor();
    console();
    Logical_Lock();
    fm();
    return 0;
}

之前那玩意有错的


0
褚俊皓
褚俊皓
新手天翼
新手天翼

shang函数里判断gm等于几中的单引号会报错,应改为双引号

0
0
王文博
王文博
缔造者之神
缔造者之神

@王子逸 @沙宸安 觉得这个行不?

0
0
0
李雨萌
李雨萌
资深守护
资深守护

大佬,请收下我的膝盖!!!

0
0
0
0
0
沙宸安
沙宸安
高级启示者
高级启示者

我看了一下改动的地方,我的观点是:

可能想对消息的提示您更加讲究对称,将我的“>>[内容]”都改成了“>>[内容]<<”,这可能是我玩MC遗留下来的习惯,因为我在玩一些服务器时都是以“>>”开头,后接系统消息内容,当然,如果你们愿意的话,我会改的。

我要回答