Green1127

C++代码存放设施 site - 01 所有UTF-8已同步

博客园 首页 新随笔 联系 订阅 管理
弹球
//作者:https://www.luogu.com.cn/user/126871 //转自:https://www.luogu.com.cn/blog/yzh-Error404/tan-qiu-xiao-you-hu //使用鼠标点击进入游戏 #include<bits/stdc++.h> #include<windows.h> #define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0) #define jp(x) ((GetAsyncKeyState(x)&0x8000)?1:0) using namespace std; struct Button { int x,y,color; const char *name; int len; }; inline void GetPos(POINT &pt) { HWND hwnd=GetForegroundWindow(); GetCursorPos(&pt); ScreenToClient(hwnd,&pt); pt.y=pt.y/16; pt.x=pt.x/8; } inline void color(int a) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a); } inline void gto(int x,int y) { COORD pos; pos.X=y; pos.Y=x; SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos); } inline Button NewButton(int x,int y,int color,const char *name) { Button t; t.x=x; t.y=y; t.name=name; t.color=color; t.len=strlen(name); gto(x,y),cout<<name; return t; } inline bool Preserve(Button A) { gto(A.x,A.y),color(A.color); POINT pt; GetPos(pt); if(pt.y==A.x&&(pt.x>=A.y&&pt.x<=A.y+A.len)) { if(KEY_DOWN(MOUSE_MOVED))return 1; } return 0; } inline void dis_mouse() { ShowCursor(false); HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE); CONSOLE_CURSOR_INFO cci; GetConsoleCursorInfo(hOut,&cci); cci.bVisible=false; SetConsoleCursorInfo(hOut,&cci); } inline void print(int x,int y,int col,string c) { color(col); y*=2; gto(x,y); cout<<c; color(7); } int ma[100][100]={{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,1}, {1,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, {1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1}, {1,2,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,2,1}, {1,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,1}, {1,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}, {1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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}}; int lm=5,rm=5; int scl=0,scr=0; int bx=5,by=11; int gogo;//1左上,2左,3左下,4右上,5右,6右下 int fx[10]={0,-1, 0, 1,-1, 0, 1}; int fy[10]={0,-1,-1,-1, 1, 1, 1}; inline void printmap() { for(register int i=0;i<=10;i++) for(register int j=0;j<=30;j++) { if(ma[i][j]==0)print(i,j,7," "); if(ma[i][j]==1)print(i,j,8,"■"); if(ma[i][j]==2)print(i,j,4,"■"); if(ma[i][j]==3)print(i,j,7,"●"); gto(11,20); printf("%d:%d",scl,scr); } } int main() { srand(time(NULL)); gogo=rand()%6+1; dis_mouse(); system("mode con cols=46 lines=16"); print(1,0,7,"弹球"); Button pvp=NewButton(5,0,7,">pvp"); Button pvc=NewButton(7,0,7,">pvc"); while(1) { if(Preserve(pvp)) { printmap(); while(1) { if(jp('W')) { if(by==2)gogo=4; if(lm>2) { ma[lm+1][1]=0; print(lm+1,1,7," "); lm--; ma[lm-1][1]=2; print(lm-1,1,4,"■"); } Sleep(50); } if(jp('S')) { if(by==2)gogo=6; if(lm<8) { ma[lm-1][1]=0; print(lm-1,1,7," "); lm++; ma[lm+1][1]=2; print(lm+1,1,4,"■"); } Sleep(50); } if(jp(38)) { if(by==21)gogo=1; if(rm>2) { ma[rm+1][21]=0; print(rm+1,21,7," "); rm--; ma[rm-1][21]=2; print(rm-1,21,4,"■"); } Sleep(50); } if(jp(40)) { if(by==21)gogo=3; if(rm<8) { ma[rm-1][21]=0; print(rm-1,21,7," "); rm++; ma[rm+1][21]=2; print(rm+1,21,4,"■"); } Sleep(50); } if(gogo==1) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(bx==0)bx-=fx[gogo],by-=fy[gogo],gogo=3; if(by==1&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=4; if(by==1&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scr++,printmap(),Sleep(2048); print(bx,by,7,"●"); Sleep(100); } if(gogo==2) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(by==1&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=5; if(by==1&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scr++,printmap(),Sleep(2048); print(bx,by,7,"●"); Sleep(100); } if(gogo==3) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(bx==10)bx-=fx[gogo],by-=fy[gogo],gogo=1; if(by==1&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=5; if(by==1&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scr++,printmap(),Sleep(2048); print(bx,by,7,"●"); Sleep(100); } if(gogo==4) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(bx==0)bx-=fx[gogo],by-=fy[gogo],gogo=6; if(by==21&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=1; if(by==21&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scl++,printmap(),Sleep(2048); print(bx,by,7,"●"); Sleep(100); } if(gogo==5) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(by==21&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=2; if(by==21&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scl++,printmap(),Sleep(2048); print(bx,by,7,"●"); Sleep(100); } if(gogo==6) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(bx==10)bx-=fx[gogo],by-=fy[gogo],gogo=4; if(by==21&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=3; if(by==21&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scl++,printmap(),Sleep(2048); print(bx,by,7,"●"); Sleep(100); } if(scl==3) { system("cls"); printf("player 1 wins!"); Sleep(3096); system("cls"); scl=scr=0; print(1,0,7,"弹球"); print(5,0,7,">pvp"); print(7,0,7,">pvc"); break; } if(scr==3) { system("cls"); printf("player 2 wins!"); Sleep(3096); system("cls"); scl=scr=0; print(1,0,7,"弹球"); print(5,0,7,">pvp"); print(7,0,7,">pvc"); break; } } } if(Preserve(pvc)) { printmap(); while(1) { if(jp('W')) { if(by==2)gogo=4; if(lm>2) { ma[lm+1][1]=0; print(lm+1,1,7," "); lm--; ma[lm-1][1]=2; print(lm-1,1,4,"■"); } } if(jp('S')) { if(by==2)gogo=6; if(lm<8) { ma[lm-1][1]=0; print(lm-1,1,7," "); lm++; ma[lm+1][1]=2; print(lm+1,1,4,"■"); } } if(gogo==1) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(bx==0)bx-=fx[gogo],by-=fy[gogo],gogo=3; if(by==1&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=4; if(by==1&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scr++,printmap(),Sleep(2048); print(bx,by,7,"●"); int isgo=rand()%5; if(isgo!=0) { if(by==21)gogo=1; if(rm>2) { ma[rm+1][21]=0; print(rm+1,21,7," "); rm--; ma[rm-1][21]=2; print(rm-1,21,4,"■"); } Sleep(100); } Sleep(100); } if(gogo==2) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(by==1&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=5; if(by==1&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scr++,printmap(),Sleep(2048); print(bx,by,7,"●"); Sleep(100); } if(gogo==3) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(bx==10)bx-=fx[gogo],by-=fy[gogo],gogo=1; if(by==1&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=5; if(by==1&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scr++,printmap(),Sleep(2048); print(bx,by,7,"●"); int isgo=rand()%5; if(isgo!=0) { if(by==21)gogo=3; if(rm<8) { ma[rm-1][21]=0; print(rm-1,21,7," "); rm++; ma[rm+1][21]=2; print(rm+1,21,4,"■"); } Sleep(100); } Sleep(100); } if(gogo==4) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(bx==0)bx-=fx[gogo],by-=fy[gogo],gogo=6; if(by==21&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=1; if(by==21&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scl++,printmap(),Sleep(2048); print(bx,by,7,"●"); int isgo=rand()%5; if(isgo==0) { if(by==21)gogo=1; if(rm>2) { ma[rm+1][21]=0; print(rm+1,21,7," "); rm--; ma[rm-1][21]=2; print(rm-1,21,4,"■"); } Sleep(100); } Sleep(100); } if(gogo==5) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(by==21&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=2; if(by==21&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scl++,printmap(),Sleep(2048); print(bx,by,7,"●"); Sleep(100); } if(gogo==6) { print(bx,by,7," "); bx+=fx[gogo],by+=fy[gogo]; if(bx==10)bx-=fx[gogo],by-=fy[gogo],gogo=4; if(by==21&&ma[bx-fx[gogo]][by]==2)bx-=fx[gogo],by-=fy[gogo],gogo=3; if(by==21&&ma[bx-fx[gogo]][by]!=2)ma[bx][by]=0,bx=5,by=11,ma[bx][by]=3,gogo=rand()%6+1,scl++,printmap(),Sleep(2048); print(bx,by,7,"●"); int isgo=rand()%5; if(isgo!=0) { if(by==21)gogo=3; if(rm<8) { ma[rm-1][21]=0; print(rm-1,21,7," "); rm++; ma[rm+1][21]=2; print(rm+1,21,4,"■"); } Sleep(100); } Sleep(100); } if(scl==3) { system("cls"); printf("player 1 wins!"); Sleep(3096); system("cls"); scl=scr=0; print(1,0,7,"弹球"); print(5,0,7,">pvp"); print(7,0,7,">pvc"); break; } if(scr==3) { system("cls"); printf("computer wins!"); Sleep(3096); system("cls"); scl=scr=0; print(1,0,7,"弹球"); print(5,0,7,">pvp"); print(7,0,7,">pvc"); break; } } } } return 0; }

 

子弹打飞机
#include<iostream>
#include<windows.h>
#include<conio.h>
#include<time.h>
#include<string>
using namespace std;
typedef struct Frame
{
    COORD position[2];
    int flag;
}Frame;
void SetPos(COORD a)
{
    HANDLE out=GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(out, a);
}
void SetPos(int i, int j)
{
    COORD pos={i, j};
    SetPos(pos);
}
void HideCursor()
{
    CONSOLE_CURSOR_INFO cursor_info = {1, 0}; 
    SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
}
 //把第y行,[x1, x2) 之间的坐标填充为 ch
void drawRow(int y, int x1, int x2, char ch)
{
    SetPos(x1,y);
    for(int i = 0; i <= (x2-x1); i++) cout<<ch;
}
 //在a, b 纵坐标相同的前提下,把坐标 [a, b] 之间填充为 ch
void drawRow(COORD a, COORD b, char ch)
{
    if(a.Y == b.Y) drawRow(a.Y, a.X, b.X, ch);
    else {
        SetPos(0, 25);
        cout<<"error code 01:无法填充行,因为两个坐标的纵坐标(x)不相等";
        system("pause");
    }
}
 //把第x列,[y1, y2] 之间的坐标填充为 ch
void drawCol(int x, int y1, int y2, char ch)
{
    int y=y1;
    while(y!=y2+1) {
        SetPos(x, y);
        cout<<ch;
        y++;
    }
}
 //在a, b 横坐标相同的前提下,把坐标 [a, b] 之间填充为 ch
void drawCol(COORD a, COORD b, char ch)
{
    if(a.X == b.X) drawCol(a.X, a.Y, b.Y, ch);
    else {
        SetPos(0, 25);
        cout<<"error code 02:无法填充列,因为两个坐标的横坐标(y)不相等";
        system("pause");
    }
}
 //左上角坐标、右下角坐标、用row填充行、用col填充列
void drawFrame(COORD a, COORD  b, char row, char col)
{
    drawRow(a.Y, a.X+1, b.X-1, row);
    drawRow(b.Y, a.X+1, b.X-1, row);
    drawCol(a.X, a.Y+1, b.Y-1, col);
    drawCol(b.X, a.Y+1, b.Y-1, col);
}
 void drawFrame(int x1, int y1, int x2, int y2, char row, char col)
{
    COORD a={x1, y1};
    COORD b={x2, y2};
    drawFrame(a, b, row, col);
}
 void drawFrame(Frame frame, char row, char col)
{
    COORD a = frame.position[0];
    COORD b = frame.position[1];
    drawFrame(a, b, row, col);
}
 void drawPlaying()
{
    drawFrame(0, 0, 48, 24, '=', '|');//    draw map frame;
    drawFrame(49, 0, 79, 4, '-', '|');//        draw output frame
    drawFrame(49, 4, 79, 9, '-', '|');//        draw score frame
    drawFrame(49, 9, 79, 20, '-', '|');//   draw operate frame
    drawFrame(49, 20, 79, 24, '-', '|');//  draw other message frame
    SetPos(52, 6);
    cout<<"得分:";
    SetPos(52, 7);
    cout<<"称号:";
    SetPos(52,10);
    cout<<"操作方式:";
    SetPos(52,12);
    cout<<"  a,s,d,w 控制战机移动。";
    SetPos(52,14);
    cout<<"  p 暂停游戏。";
    SetPos(52,16);
    cout<<"  e 退出游戏。";
}
 //在[a, b)之间产生一个随机整数
int random(int a, int b)
{
    int c=(rand() % (a-b))+ a;
    return c;
}
 //在两个坐标包括的矩形框内随机产生一个坐标
COORD random(COORD a, COORD b)
{
    int x=random(a.X, b.X);
    int y=random(a.Y, b.Y);
    COORD c={x, y};
    return c;
}
 bool  judgeCoordInFrame(Frame frame, COORD spot)
{
    if(spot.X>=frame.position[0].X)
        if(spot.X<=frame.position[1].X)
            if(spot.Y>=frame.position[0].Y)
                if(spot.Y<=frame.position[0].Y)
                    return true;
    return false;
}
 void printCoord(COORD a)
{
    cout    <<"( "<<a.X<<" , "<<a.Y<<" )";
}
 void printFrameCoord(Frame a)
{
    printCoord(a.position[0]);
    cout    <<" - ";
    printCoord(a.position[1]);
}
 int drawMenu()
{
    SetPos(30, 1);
    cout<<"P l a n e  W a r";
    drawRow(3, 0, 79, '-');
    drawRow(5, 0, 79, '-');
    SetPos(28, 4);
    cout<<"w 和 s 选择, k 确定";
    SetPos(15, 11);
    cout<<"1. 简单的敌人";
    SetPos(15, 13);
    cout<<"2. 冷酷的敌人";
    drawRow(20, 0, 79, '-');
    drawRow(22, 0, 79, '-');
    SetPos(47, 11);
    cout<<"简单的敌人:";
    SetPos(51, 13);
    cout<<"简单敌人有着较慢的移动速度。";
    int j=11;
    cout<<">>";
    while(1) {
        if( _kbhit() ) {    
            char x=_getch();
            switch (x) {
              case 'w' : {  
                if( j == 13) {
                  SetPos(12, j);
                  cout<<" ";
                  j = 11;
                  SetPos(12, j);
                  cout<<">>";
                  SetPos(51, 13);
                  cout<<"            ";
                  SetPos(47, 11);
                  cout<<"简单的敌人:";
                  SetPos(51, 13);
                  cout<<"简单敌人有着较慢的移动速度。";
                }
                break;
              }
              case 's' : {  
                if( j == 11 ) {
                  SetPos(12, j);
                  cout<<" ";        
                  j = 13;
                  SetPos(12, j);
                  cout<<">>";
                  SetPos(51, 13);
                   cout<<"              ";
                   SetPos(47, 11);
                   cout<<"冷酷的敌人:";
                   SetPos(51, 13);
                   cout<<"冷酷的敌人移动速度较快。";
                }
                break;
              }
              case 'k' : {  
                if (j == 8) return 1; else return 2;
              }
            }
        }
    }
}
/*================== the Game Class ==================*/
 class Game
{
public:
    COORD position[10];
    COORD bullet[10];
    Frame enemy[8];
    int score;
    int rank;
    int rankf;
    string title;
    int flag_rank;
     Game ();
    
    //初始化所有
    void initPlane();
    void initBullet();
    void initEnemy();
     //初始化其中一个
    //void initThisBullet( COORD );
    //void initThisEnemy( Frame );
     void planeMove(char);
    void bulletMove();
    void enemyMove();
    
    //填充所有
    void drawPlane();
    void drawPlaneToNull();
    void drawBullet();
    void drawBulletToNull();
    void drawEnemy();
    void drawEnemyToNull();
     //填充其中一个
    void drawThisBulletToNull( COORD );
    void drawThisEnemyToNull( Frame );
     void Pause();
    void Playing();
    void judgePlane();
    void judgeEnemy();
     void Shoot();
     void GameOver();
    void printScore();
};
 Game::Game()
{
    initPlane();
    initBullet();
    initEnemy();
    score = 0;
    rank = 25;
    rankf = 0;
    flag_rank = 0;
}
 void Game::initPlane()
{
    COORD centren={39, 22};
    position[0].X=position[5].X=position[7].X=position[9].X=centren.X;
    position[1].X=centren.X-2;  
    position[2].X=position[6].X=centren.X-1;
    position[3].X=position[8].X=centren.X+1;
    position[4].X=centren.X+2;
    for(int i=0; i<=4; i++)
        position[i].Y=centren.Y;
    for(int i=6; i<=8; i++)
        position[i].Y=centren.Y+1;
    position[5].Y=centren.Y-1;
    position[9].Y=centren.Y-2;
}
 void Game::drawPlane()
{
    for(int i=0; i<9; i++)
    {
        SetPos(position[i]);
        if(i!=5)
            cout<<"O";
        else if(i==5)
            cout<<"|";      
    }
}
 void Game::drawPlaneToNull()
{
    for(int i=0; i<9; i++)
    {
        SetPos(position[i]);
        cout<<" ";
    }   
}
 void Game::initBullet()
{
    for(int i=0; i<10; i++)
        bullet[i].Y = 30;
}
 void Game::drawBullet()
{
    for(int i=0; i<10; i++)
    {
        if( bullet[i].Y != 30)
        {
            SetPos(bullet[i]);
            cout<<"^";  
        }
    }
}
 void Game::drawBulletToNull()
{
    for(int i=0; i<10; i++)
        if( bullet[i].Y != 30 )
            {
                COORD pos={bullet[i].X, bullet[i].Y+1};
                SetPos(pos);
                cout<<" ";
            }   
}
 void Game::initEnemy()
{
    COORD a={1, 1};
    COORD b={45, 15};
    for(int i=0; i<8; i++)
    {
        enemy[i].position[0] = random(a, b);
        enemy[i].position[1].X = enemy[i].position[0].X + 3;
        enemy[i].position[1].Y = enemy[i].position[0].Y + 2;
    }
}
 void Game::drawEnemy()
{
    for(int i=0; i<8; i++)
        drawFrame(enemy[i].position[0], enemy[i].position[1], '-', '|');
}
 void Game::drawEnemyToNull()
{
    for(int i=0; i<8; i++)
    {
        drawFrame(enemy[i].position[0], enemy[i].position[1], ' ', ' ');
    }       
}
 void Game::Pause()
{
    SetPos(61,2);
    cout<<"               ";
    SetPos(61,2);
    cout<<"暂停中...";
    char c=_getch();
    while(c!='p')
        c=_getch();
    SetPos(61,2);
    cout<<"         ";
}
 void Game::planeMove(char x)
{
    if(x == 'a')
        if(position[1].X != 1)
            for(int i=0; i<=9; i++)
                position[i].X -= 2;
                
    if(x == 's')
        if(position[7].Y != 23)
            for(int i=0; i<=9; i++)
                position[i].Y += 1;
     if(x == 'd')
        if(position[4].X != 47)
            for(int i=0; i<=9; i++)
                position[i].X += 2;
     if(x == 'w')
        if(position[5].Y != 3)
            for(int i=0; i<=9; i++)
                position[i].Y -= 1;
}
 void Game::bulletMove()
{
    for(int i=0; i<10; i++)
    {
        if( bullet[i].Y != 30)
        {
            bullet[i].Y -= 1;
            if( bullet[i].Y == 1 )
            {
                COORD pos={bullet[i].X, bullet[i].Y+1};
                drawThisBulletToNull( pos );
                bullet[i].Y=30;
            }
                
        }
    }
}
 void Game::enemyMove()
{
    for(int i=0; i<8; i++)
    {
        for(int j=0; j<2; j++)
            enemy[i].position[j].Y++;
         if(24 == enemy[i].position[1].Y)
        {
            COORD a={1, 1};
            COORD b={45, 3};
            enemy[i].position[0] = random(a, b);
            enemy[i].position[1].X = enemy[i].position[0].X + 3;
            enemy[i].position[1].Y = enemy[i].position[0].Y + 2;
        }
    }
}
 void Game::judgePlane()
{
    for(int i = 0; i < 8; i++)
        for(int j=0; j<9; j++)
            if(judgeCoordInFrame(enemy[i], position[j]))
            {
                SetPos(62, 1);
                cout<<"坠毁";
                drawFrame(enemy[i], '+', '+');
                Sleep(1000);
                GameOver();
                break;
            }
}
 void Game::drawThisBulletToNull( COORD c)
{
    SetPos(c);
    cout<<" ";
}
 void Game::drawThisEnemyToNull( Frame f )
{
    drawFrame(f, ' ', ' ');
}
 void Game::judgeEnemy()
{
    for(int i = 0; i < 8; i++)
        for(int j = 0; j < 10; j++)
            if( judgeCoordInFrame(enemy[i], bullet[j]) )
            {
                score += 5;
                drawThisEnemyToNull( enemy[i] );
                COORD a={1, 1};
                COORD b={45, 3};
                enemy[i].position[0] = random(a, b);
                enemy[i].position[1].X = enemy[i].position[0].X + 3;
                enemy[i].position[1].Y = enemy[i].position[0].Y + 2;                    
                drawThisBulletToNull( bullet[j] );
                bullet[j].Y = 30;
            }
}
 void Game::Shoot()
{
    for(int i=0; i<10; i++)
        if(bullet[i].Y == 30)
        {
            bullet[i].X = position[5].X;
            bullet[i].Y = position[5].Y-1;
            break;
        }
}
 void Game::printScore()
{
    if(score == 120 && flag_rank == 0)
    {
        rank -= 3;
        flag_rank = 1;
    }
     else if( score == 360 && flag_rank == 1)
    {
        rank -= 5;
        flag_rank = 2;
    }
    else if( score == 480 && flag_rank == 2)
    {
        rank -= 5;
        flag_rank = 3;
    }
    int x=rank/5;
    SetPos(60, 6);
    cout<<score;
     if( rank!=rankf )
    {
        SetPos(60, 7);
        if( x == 5)
            title="初级飞行员";
        else if( x == 4)
            title="中级飞行员";
        else if( x == 3)
            title="高级飞行员";
        else if( x == 2 )
            title="王牌飞行员";
        cout<<title;
    }
    rankf = rank;
}
 void Game::Playing()
{
    //HANDLE MFUN;
    //MFUN= CreateThread(NULL, 0, MusicFun, NULL, 0, NULL); 
     drawEnemy();
    drawPlane();
     int flag_bullet = 0;
    int flag_enemy = 0;
     while(1)
    {
        Sleep(8);
        if(_kbhit())
        {
            char x = _getch();
            if ('a' == x || 's' == x || 'd' == x || 'w' == x)
            {
                drawPlaneToNull();
                planeMove(x);
                drawPlane();
                judgePlane();
            }           
            else if ('p' == x)
                Pause();
            else if( 'k' == x)
                Shoot();
            else if( 'e' == x)
            {
                //CloseHandle(MFUN);
                GameOver();
                break;
            }
                
        }
        /* 处理子弹 */
        if( 0 == flag_bullet )
        {
            bulletMove();
            drawBulletToNull();
            drawBullet();
            judgeEnemy();
        }           
        flag_bullet++;
        if( 5 == flag_bullet )
            flag_bullet = 0;
         /* 处理敌人 */
        if( 0 == flag_enemy )
        {
            drawEnemyToNull();
            enemyMove();            
            drawEnemy();
            judgePlane();
        }
        flag_enemy++;
        if( flag_enemy >= rank )
            flag_enemy = 0;
         /* 输出得分 */
        printScore();
    }
}
 void Game::GameOver()
{
    system("cls");              
    COORD p1={28,9};
    COORD p2={53,15};
    drawFrame(p1, p2, '=', '|');
    SetPos(36,12);
    string str="Game Over!";
    for(int i=0; i<str.size(); i++)
    {
        Sleep(80);
        cout<<str[i];
    }
    Sleep(1000);
    system("cls");
    drawFrame(p1, p2, '=', '|');
    SetPos(31, 11);
    cout<<"击落敌机:"<<score/5<<" 架";
    SetPos(31, 12);
    cout<<"得  分:"<<score;
    SetPos(31, 13);
    cout<<"获得称号:"<<title;
    SetPos(30, 16);
    Sleep(1000);
    cout<<"继续? 是(y)| 否(n)";
as:
    char x=_getch();
    if (x == 'n')
        exit(0);
    else if (x == 'y')
    {
        system("cls");
        Game game;
        int a = drawMenu();
        if(a == 2)
            game.rank = 20;
        system("cls");
        drawPlaying();
        game.Playing();
    }
    else goto as;
}
 /*================== the main function ==================*/
int main()
{
    //游戏准备
    srand((int)time(0));    //随机种子
    HideCursor();   //隐藏光标
    
    Game game;
    int a = drawMenu();
    if(a == 2)
        game.rank = 20;
    system("cls");
    drawPlaying();
    game.Playing();
}

  

打飞机加强版
//转自:https://www.luogu.com.cn/discuss/30357?page=59
#include <stdio.h>
#include <conio.h>
#include <windows.h>
#include <time.h>
#include <stdlib.h>
#define T 10
#define R 23
#define C 49
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
int difficulty = 1, tim, score, HP, asd;
char ch;
int xx, yy, cnt, p1, p2, q1, q2;
bool bul[R+5][C+5], Bul[R+5][C+5];
int occ[R+5][C+5];
char board[R+5][80], last[R+5][80];
int llast;
bool ls, t2, t3;

void gotoxy(int x, int y) {
   COORD coord = {y, x};
   SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
}

void printxy(int x, int y, char ch) {
   COORD coord = {x, y};
   SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), coord);
   putchar(ch);
}

int max(int a, int b) {
    return a > b ? a : b;
}

int min(int a, int b) {
    return a > b ? b : a;
}

struct enemy {
    bool dead;
    int x, y;
    int type;
    int blood;
}enemies[1000010];

int gtt, gtx, gty;

int rand_gt_type(void) {
    switch (rand() % 5) {
        case 0: case 1: {
            switch (rand() % 10) {
                case 0: case 1: {
                    return 3;
                    break;
                }
                case 2: case 3: case 4: {
                    return 2;
                    break;
                }
                case 5: case 6: case 7: case 8: case 9: {
                    return 1;
                    break;
                }
            }
            break;
        }
        case 2: case 3: {
            switch (rand() % 3) {
                case 0: case 1: {
                    return 4;
                    break;
                }
                case 2: {
                    return 5;
                    break;
                }
            }
            break;
        }
        case 4: {
            return 6;
            break;
        }
    }
}

void draw_gt(int x, int y, int type) {
    if (type == 0) return;
    if (gtx >= 0) for (int i = 0; i <= 4; i++) board[x][y+i] = '-';
    for (int i = 0; i <= 4; i++) board[x+2][y+i] = '-';
    if (gtx >= -1)board[x+1][y] = board[x+1][y+4] = '|';
    if (gtx >= -1) switch (type) {
        case 1: case 2: case 3: {
            board[x+1][y+1] = '+';
            board[x+1][y+2] = 49 + (1 << (type - 1));
            board[x+1][y+3] = '0';
            break;
        }
        case 4: case 5: {
            board[x+1][y+1] = '^';
            board[x+1][y+2] = 'x';
            board[x+1][y+3] = 46 + type;
            break;
        }
        case 6: {
            board[x+1][y+1] = '1';
            board[x+1][y+2] = 'U';
            board[x+1][y+3] = 'P';
            break;
        }
    }
}

void RND(void) {
    srand(time(0));
    int ASDFGHJKL = rand();
    while (ASDFGHJKL--) srand(rand());
}

void start(void) {
    system("cls");
    tim = score = HP = asd = ch = xx = yy = cnt = p1 = p2 = q1 = q2 = llast = ls = t2 = t3 = 0;
    memset(bul, 0, sizeof(bul));
    memset(Bul, 0, sizeof(Bul));
    memset(occ, 0, sizeof(occ));
    memset(board, 0, sizeof(board));
    memset(last, 0, sizeof(last));
    memset(enemies, 0, sizeof(enemies));
    system("cls");
    for (int i = 0; i <= R+1; i++) {
        for (int j = 0; j <= 78; j++) {
            if (i == 0 || j == 0 || i == R+1 || j == 78) putchar('#');
            else putchar(32);
        }
        if (i != R+1) putchar(10);
    }
    gotoxy(7, 34);
    printf("请选择难度");
    gotoxy(10,35);
    printf("简单模式");
    gotoxy(13,35);
    printf("中等模式");
    gotoxy(16,35);
    printf("困难模式");
    gotoxy(difficulty * 3 + 7, 33);
    putchar('>');
    while ((ch = getch()) != 10 && ch != 13) {
        if (ch == -32) {
            ch = getch();
            if (ch == 72) if (difficulty != 1) {
                gotoxy(difficulty * 3 + 7, 33);
                putchar(' ');
                gotoxy((--difficulty) * 3 + 7, 33);
                putchar('>');
            }
            if (ch == 80) if (difficulty != 3) {
                gotoxy(difficulty * 3 + 7, 33);
                putchar(' ');
                gotoxy((++difficulty) * 3 + 7, 33);
                putchar('>');
            }
        }
    }
    switch(difficulty) {
        case 1: {
            tim = 12;
            p1 = 7;
            q1 = 1;
            p2 = 5;
            q2 = 1;
            break;
        }
        case 2: {
            tim = 10;
            p1 = 6;
            q1 = 1;
            p2 = 4;
            q2 = 1;
            break;
        }
        case 3: {
            tim = 8;
            p1 = 5;
            q1 = 1;
            p2 = 3;
            q2 = 1;
            break;
        }
    }
    system("cls");
}

int length(int type) {
    return 2 + (1 << (type - 1));
}

int width(int type) {
    return 3 + (1 << type);
}

int blood(int type) {
    if (type == 3) return 5;
    return type;
}

bool GAMEOVER(void) {
    for (int i = yy-2; i <= yy+2; i++) {
        if (occ[xx+1][i] || Bul[xx+1][i]) return 1;
    }
    for (int i = yy-1; i <= yy+1; i++) {
        if (occ[xx+2][i] || Bul[xx+2][i]) return 1;
    }
    return 0;
}

bool create_enemy(int pos, int type) {
    for (int i = max(pos, 1); i <= min(pos + width(type) - 1, C); i++) if (occ[1][i]) return 0;
    cnt++;
    enemies[cnt].x = 2 - length(type);
    enemies[cnt].y = pos;
    enemies[cnt].dead = 0;
    enemies[cnt].type = type;
    enemies[cnt].blood = blood(type);
    return 1;
}

void attack_enemy(int a) {
    enemies[a].blood--;
}

void paint(int x, int y, int xx, int yy, char ch) {
    x = max(x, 1);
    y = max(y, 1);
    xx = min(xx, R);
    yy = min(yy, C);
    for (int i = x; i <= xx; i++) {
        for (int j = y; j <= yy; j++) {
            board[i][j] = ch;
        }
    }
}

void draw_plane(int x, int y) {
    board[x][y] = '|';
    paint(x+1, y-2, x+1, y+2, '*');
    board[x+2][y] = '*';
    board[x+1][y-3] = board[x+2][y-1] = '\\';
    board[x+1][y+3] = board[x+2][y+1] = '/';
}

void draw_enemy(int x, int y, int type, bool broken) {
    paint(x, y, x, y, '/');
    paint(x+length(type)-1, y+width(type)-1, x+length(type)-1, y+width(type)-1, '/');
    paint(x+length(type)-1, y, x+length(type)-1, y, '\\');
    paint(x, y+width(type)-1, x, y+width(type)-1, '\\');
    paint(x, y+1, x, y+width(type)-2, '-');
    paint(x+length(type)-1, y+1, x+length(type)-1, y+width(type)-2, '-');
    paint(x+1, y, x+length(type)-2, y, '|');
    paint(x+1, y+width(type)-1, x+length(type)-2, y+width(type)-1, '|');
    paint(x+1, y+1, x+length(type)-2, y+width(type)-2, ' ');
    if (broken) {
        if (type == 2) {
            paint(x, y+2, x, y+2, 'v');
            paint(x, y+4, x, y+4, 'v');
            paint(x+1, y, x+1, y, '>');
            paint(x+1, y+4, x+1, y+4, '*');
            paint(x+2, y+2, x+2, y+2, '*');
            paint(x+2, y+6, x+2, y+6, '<');
            paint(x+3, y+2, x+3, y+2, '^');
            paint(x+3, y+4, x+3, y+4, '^');
        } else {
            paint(x, y+2, x, y+2, 'v');
            paint(x, y+5, x, y+5, 'v');
            paint(x, y+8, x, y+8, 'v');
            paint(x+1, y, x+1, y, '>');
            paint(x+3, y, x+3, y, '>');
            paint(x+1, y+8, x+1, y+8, '*');
            paint(x+2, y+2, x+2, y+2, '*');
            paint(x+2, y+6, x+2, y+6, '*');
            paint(x+3, y+4, x+3, y+4, '*');
            paint(x+3, y+8, x+3, y+8, '*');
            paint(x+4, y+2, x+4, y+2, '*');
            paint(x+2, y+10, x+2, y+10, '<');
            paint(x+4, y+10, x+4, y+10, '<');
            paint(x+5, y+2, x+5, y+2, '^');
            paint(x+5, y+5, x+5, y+5, '^');
            paint(x+5, y+8, x+5, y+8, '^');
        }
    }
}

void kill_enemy(void) {
    for (int i = 1; i <= cnt; i++) {
        if (!enemies[i].dead && enemies[i].blood <= 0) score += blood(enemies[i].type), asd++;
        if (!enemies[i].dead && (enemies[i].blood <= 0 || enemies[i].x == R+1)) enemies[i].dead = 1;
    }
}

void show_enemy(void) {
    memset(occ, 0, sizeof(occ));
    for (int i = 1; i <= cnt; i++) {
        if (!enemies[i].dead) {
            for (int x = max(enemies[i].x, 1); x <= min(enemies[i].x + length(enemies[i].type) - 1, R); x++) {
                for (int y = max(enemies[i].y,  1); y <= min(enemies[i].y + width(enemies[i].type) - 1, C); y++) {
                    occ[x][y] = i;
                }
            }
        }
    }
}

void move_enemy() {
    for (int i = 1; i <= cnt; i++) {
        if (!enemies[i].dead) {
            enemies[i].x++;
            if (enemies[i].type == 1) {
                if (rand() % 30 == 0) Bul[enemies[i].x + 3][enemies[i].y + 2] = 1;
            }
            if (enemies[i].type == 2) {
                if (rand() % 20 == 0) Bul[enemies[i].x + 4][enemies[i].y + 3] = 1;
            }
            if (enemies[i].type == 3) {
                if (rand() % 10 == 0) Bul[enemies[i].x + 6][enemies[i].y + 4] = 1;
                if (rand() % 10 == 0) Bul[enemies[i].x + 6][enemies[i].y + 6] = 1;
            }
        }
    }
}

void draw_score(void) {
    board[3][58] = -75;
    board[3][59] = -61;
    board[3][60] = -73;
    board[3][61] = -42;
    board[3][62] = -93;
    board[3][63] = -70;
    int arr[10];
    memset(arr, 0, sizeof(arr));
    if (score == 0) board[3][64] = '0';
    else {
        int t = 0;
        int s = score;
        while (s) {
            arr[++t] = s % 10;
            s /= 10;
        }
        for (int i = t; i >= 1; i--) {
            board[3][64+t-i] = 48 + arr[i];
        }
    }
    board[6][58] = -61;
    board[6][59] = -4;
    board[6][60] = -54;
    board[6][61] = -3;
    board[6][62] = -93;
    board[6][63] = -70;
    int c = HP+1;
    while (c--) board[6][c+64] = 3;
}

void draw_line(void) {
    for (int i = 0; i <= R+1; i++) board[i][0] = board[i][C+1] = board[i][78] = '#';
    for (int i = 0; i <= 78; i++) board[0][i] = board[R+1][i] = '#';
    for (int i = C+2; i <= 78; i++) board[9][i] = '#';
}

void draw(void) {
    memcpy(last, board, sizeof(board));
    memset(board, 32, sizeof(board));
    draw_plane(xx, yy);
    for (int i = 1; i <= cnt; i++) {
        if (!enemies[i].dead) draw_enemy(enemies[i].x, enemies[i].y, enemies[i].type, (enemies[i].type != 1 && enemies[i].blood <= enemies[i].type * 2 - 3));
    }
    for (int i = 1; i <= R; i++) {
        for (int j = 1; j <= C; j++) {
            if (bul[i][j]) board[i][j] = '^';
            if (Bul[i][j]) board[i][j] = 'v';
        }
    }
    draw_gt(gtx, gty, gtt);
    draw_score();
    draw_line();
}

void create_gt(void) {
    gtt = rand_gt_type();
    gtx = -1;
    gty = rand() % (C-4) + 1;
}

bool in_gt(int x, int y) {
    return (x >= gtx && x <= gtx + 2 && y >= gty && y <= gty + 4);
}

bool get_gt(void) {
    if (in_gt(xx, yy)) return 1;
    for (int i = yy-1; i <= yy+1; i++) if (in_gt(xx+1, i)) return 1;
    for (int i = yy-1; i <= yy+1; i++) if (in_gt(xx+2, i)) return 1;
    return 0;
}

void use_gt(void) {
    switch(gtt) {
        case 1: {
            score += 20;
            break;
        }
        case 2: {
            score += 30;
            break;
        }
        case 3: {
            score += 50;
            break;
        }
        case 4: {
            score += 10;
            t2 = 1;
            break;
        }
        case 5: {
            score += 10;
            t3 = 1;
            break;
        }
        case 6: {
            score += 10;
            HP++;
            break;
        }
    }
    gtt = 0;
}

void move_gt(void) {
    gtx++;
    if (gtx == R+1) gtt = 0;
}

void print(void) {
    for (int i = 0; i <= R+1; i++) {
        for (int j = 0; j <= 79; j++) {
            if (board[i][j] != last[i][j]) {
                printxy(j, i, board[i][j]);
            }
        }
    }
}

bool end(void) {
    system("cls");
    for (int i = 0; i <= R+1; i++) {
        for (int j = 0; j <= 78; j++) {
            if (i == 0 || j == 0 || i == R+1 || j == 78) putchar('#');
            else putchar(32);
        }
        if (i != R+1) putchar(10);
    }
    gotoxy(5, 35);
    switch(difficulty) {
        case 1: {
            printf("简单模式");
            break;
        }
        case 2: {
            printf("中等模式");
            break;
        }
        case 3: {
            printf("困难模式");
            break;
        }
    }
    gotoxy(8, 35);
    printf("得分:%d", score);
    gotoxy(11, 34);
    printf("击落敌机%d架", asd);
    gotoxy(14, 33);
    printf("继续游戏?(Y/N)");
    while (1) {
        switch(getch()) {
            case 'Y': case 'y': {
                return 1;
                break;
            }
            case 'N': case 'n': {
                return 0;
                break;
            }
        }
    }
}

void game(void) {
    xx = 21;
    yy = 25;
    int t = 0;
    HP = 4 - difficulty;
    draw();
    for (int i = 0; i <= R+1; i++) {
        for (int j = 0; j <= 78; j++) {
            putchar(board[i][j]);
        }
        if (i != R+1) putchar(10);
    }
    while (HP--) {
    xx = 21;
    yy = 25;
    t = 0;
    llast = 0;
    ls = 0;
    while (!GAMEOVER()) {
        t++;
        if (KEY_DOWN(VK_MENU)) {
            exit(0);
        }
        if (KEY_DOWN(VK_CONTROL)) {
            getch();
        }
        if (t - llast >= 3) {
            if (KEY_DOWN(VK_RIGHT) && yy != 46) yy++, llast = t;
            if (KEY_DOWN(VK_LEFT) && yy != 4) yy--, llast = t;
        }
        if (t - llast >= 6) {
             if (KEY_DOWN(VK_DOWN) && xx != 21) xx++, llast = t;
            if (KEY_DOWN(VK_UP) && xx != 1) xx--, llast = t;
        }
        if (KEY_DOWN(VK_SPACE)) {
            if (!ls) 
            if (t3) bul[xx][yy] = bul[xx][yy-2] = bul[xx][yy+2] = 1;
            else if (t2) bul[xx][yy-1] = bul[xx][yy+1] = 1;
            else bul[xx][yy] = 1;
            ls = 1;
        } else ls = 0; 
        for (int i = 1; i <= R; i++) {
            for (int j = 1; j <= C; j++) {
                if (i != 1) bul[i-1][j] = bul[i][j];
                bul[i][j] = 0;
                if (bul[i-1][j]) {
                    if (occ[i-1][j]) {
                        attack_enemy(occ[i-1][j]);
                        bul[i-1][j] = 0;
                    } else if (occ[i][j]) {
                        attack_enemy(occ[i][j]);
                        bul[i-1][j] = 0;
                    }   
                }
            }
        }
        if (get_gt()) use_gt();
        kill_enemy();
        show_enemy();
        draw();
        print();
        if (t % (tim>>1) == 0) {
            for (int i = R; i >= 1; i--) {
                for (int j = 1; j <= C; j++) {
                    if (i != R) Bul[i+1][j] = Bul[i][j];
                    Bul[i][j] = 0;
                }
            }
        }
        if (t % tim == 0) {
            if (gtt) move_gt();
            move_enemy();
            if (rand() % p1 < q1) {
                int type;
                switch(rand() % 13) {
                    case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: {
                        type = 1;
                        break;
                    }
                    case 9: case 10: case 11: {
                        type = 2;
                        break;
                    }
                    default: {
                        type = 3;
                        break;
                    }
                }
                create_enemy(1 + rand() % (C - width(type) + 1), type);
            }
            show_enemy();
            if (rand() % p2 < q2) {
                int type;
                switch(rand() % 13) {
                    case 0: case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: {
                        type = 1;
                        break;
                    }
                    case 9: case 10: case 11: {
                        type = 2;
                        break;
                    }
                    default: {
                        type = 3;
                        break;
                    }
                }
                create_enemy(1 + rand() % (C - width(type) + 1), type);
            }
        } 
        if (t % (1000 * (difficulty + 2)) == 0) create_gt();
        Sleep(10);
    }
    gtx = gty = gtt = 0;
    t2 = t3 = 0;
    draw();
    if (occ[xx][yy] || Bul[xx][yy]) board[xx][yy] = '+';
    for (int i = yy-3; i <= yy+3; i++) if (occ[xx+1][i] || Bul[xx+1][i]) board[xx+1][i] = '+';
    for (int i = yy-1; i <= yy+1; i++) if (occ[xx+2][i] || Bul[xx+2][i]) board[xx+2][i] = '+';
    print();
    Sleep(500);
    memset(occ, 0, sizeof(occ));
    memset(enemies, 0, sizeof(enemies));
    memset(bul, 0, sizeof(bul));
    memset(Bul, 0, sizeof(Bul));
    cnt = 0;
    draw();
    print();
    }
}

void work(void) {
    HANDLE handle = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_CURSOR_INFO CursorInfo;
    GetConsoleCursorInfo(handle, &CursorInfo);
    CursorInfo.bVisible = false;
    SetConsoleCursorInfo(handle, &CursorInfo);
    RND();
    do {
        start();
        game();
    } while (end());
}
int main() {
    work();
}

  

多彩逗比
//其实一直按变色就可以过了~
//原转载地址已被删除
#include<bits/stdc++.h>
#include<conio.h>
#include<windows.h>
using namespace std;
int m[11][100050]=
{
    {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,106,0,107,0,108,0,109,0,0,0,0,0,0,0},
    {0,0,0,0,0,0,0,0,0,0,0,0,101,0,102,103,0,104,105,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},
    {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1}
};
int score=0,speed=1,jump=0,yan=11,t=0,x=1,y=1,cnt=0,my=4,th=0,yq=0,aj=0,cz=0,xx=0,hscore=0,ww=0,win=0,level=0;
bool up=0,down=0;
int mouse;
bool Pass[5]={0,0,0,0,0};
POINT Windowpos()
{
    POINT pt;
    GetCursorPos(&pt);
    HWND h=GetForegroundWindow();
    ScreenToClient(h,&pt);
    pt.x/=8;pt.y/=16;
    return pt; 
}
void color(int a)
{
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
void Display(char *p,int speed,int co)
{
    for(int i=1;*p;i++)
    {
        if(co==0) color(15);
        if(co==1) color(14);
        if(co==2) color(10);
        if(co==3) color(11);
        if(co==4) color(13);
        if(co==5)
        {
            switch(rand()%4+1)
            {
                case 1:color(10);break;
                case 2:color(11);break;
                case 3:color(13);break;
                case 4:color(14);break;
            }
        }
        if(*p) printf("%c",*p++);
        Sleep(speed);
    }
}
void Go(int x,int y)  //光标移动函数,X表示横坐标,Y表示纵坐标。
{
    COORD coord;         //使用头文件自带的坐标结构
    coord.X=y;            //这里将int类型值传给short,不过程序中涉及的坐标值均不会超过short范围
    coord.Y=x;
    HANDLE a=GetStdHandle(STD_OUTPUT_HANDLE);  //获得标准输出句柄
    SetConsoleCursorPosition(a,coord);         //以标准输出的句柄为参数设置控制台光标坐标
}
void Print(int i,int j)
{
    if(i==x&&j==y) color(yan),printf("●"),color(15);
    else if(m[i][j]==1) color(15),printf("■"),color(15);
    else if(m[i][j]==11) color(11),printf("■"),color(15);
    else if(m[i][j]==13) color(13),printf("■"),color(15);
    else if(m[i][j]==10) color(10),printf("■"),color(15);
    else if(m[i][j]==0) color(0),printf("  "),color(15);
    else if(m[i][j]==101) color(14),printf("by"),color(15);
    else if(m[i][j]==102) color(14),printf("Cr"),color(15);
    else if(m[i][j]==103) color(14),printf("ab"),color(15);
    else if(m[i][j]==104) color(14),printf("Da"),color(15);
    else if(m[i][j]==105) color(14),printf("ve"),color(15);
    else if(m[i][j]==106) color(10),printf("多"),color(15);
    else if(m[i][j]==107) color(11),printf("彩"),color(15);
    else if(m[i][j]==108) color(12),printf("逗"),color(15);
    else if(m[i][j]==109) color(13),printf("比"),color(15);
    else if(m[i][j]==201) color(14),printf("★"),color(15);
    else if(m[i][j]==202) color(14),printf("★"),color(15);
    else if(m[i][j]==203) color(14),printf("★"),color(15);
    else if(m[i][j]==204) color(14),printf("★"),color(15);
    else if(m[i][j]==205) color(14),printf("★"),color(15);
    else if(m[i][j]==206) color(14),printf("★"),color(15);
    else if(m[i][j]==207) color(14),printf("★"),color(15);
}
void New(int a)
{
    srand(rand()*rand());
    if(level==1)
    {
        while(a<=100030)
        {
            int b=rand()%10+1,c=rand()%5+3,h=rand()%5,f=rand()%10,d=rand()%50,e=rand()%30;
            for(register int j=a;j<=a+c;j++)
            {
                for(int i=1;i<=10;i++)
                    m[i][j]=0;
                m[0][j]=1;
                if(!h)//地面二层 
                    for(register int i=6;i<=6;i++)
                    {
                        if(b==3||b==2||b==1)m[i][j]=11;
                        else if(b==4||b==5||b==9)m[i][j]=13;
                        else if(b==10&&c==3)m[i][j]=0;
                        else if(b==6||b==7||b==8||b==10)m[i][j]=1;
                    }
                if(!f)//地面三层 
                    for(register int i=3;i<=3;i++)
                        {
                            if(b==3||b==2||b==1)m[i][j]=11;
                            else if(b==4||b==5||b==9)m[i][j]=13;
                            else if(b==10&&c==3)m[i][j]=0;
                            else if(b==6||b==7||b==8||b==10)m[i][j]=1;
                        }
                for(register int i=9;i<=10;i++)//地面一层 
                {
                    if(b==3||b==2||b==1)m[i][j]=11;
                    else if(b==4||b==5||b==9)m[i][j]=13;
                    else if(b==10&&c==3)m[i][j]=0;
                    else if(b==6||b==7||b==8||b==10)m[i][j]=1;
                }
            }
            if(c==7&&!d)//by Crab  Dave
            {
                m[10][a]=101;
                m[10][a+1]=0;
                m[10][a+2]=102;
                m[10][a+3]=103;
                m[10][a+4]=0;
                m[10][a+5]=104;
                m[10][a+6]=105;
            }
            if(!e)//星星 
            {
                m[1][a]=201+rand()%6;
            }
            a+=c;
        }
    }
    else if(level==2)
    {
        while(a<=100030)
        {
            int b=rand()%10+1,c=rand()%5+3,h=rand()%5,f=rand()%10,d=rand()%50,e=rand()%30;
            for(register int j=a;j<=a+c;j++)
            {
                for(int i=1;i<=10;i++)
                    m[i][j]=0;
                m[0][j]=1;
                if(!h)//地面二层 
                    for(register int i=6;i<=6;i++)
                    {
                        if(b==3||b==2||b==1)m[i][j]=11;
                        else if(b==4||b==5||b==9)m[i][j]=13;
                        else if(b==10&&c==3)m[i][j]=0;
                        else if(b==6||b==7||b==8||b==10)m[i][j]=1;
                    }
                if(!f)//地面三层 
                    for(register int i=3;i<=3;i++)
                        {
                            if(b==3||b==2||b==1)m[i][j]=11;
                            else if(b==4||b==5||b==9)m[i][j]=13;
                            else if(b==10&&c==3)m[i][j]=0;
                            else if(b==6||b==7||b==8||b==10)m[i][j]=1;
                        }
                for(register int i=9;i<=10;i++)//地面一层 
                {
                    if(b==3||b==2||b==1)m[i][j]=11;
                    else if(b==4||b==5||b==9)m[i][j]=13;
                    else if(b==10&&c==3)m[i][j]=0;
                    else if(b==6||b==7||b==8||b==10)m[i][j]=1;
                }
                int w=rand()%50;
                if(!w)//墙
                {
                    for(int i=1;i<=10;i++)
                        m[i][j]=1;
                    int en1=rand()%7+1,en2=rand()%7+1,en3=rand()%7+1;
                    m[en1][j]=m[en2][j]=m[en1][j+1]=m[en2][j+1]=m[en3][j]=m[en3][j+1]=0;
                } 
            }
            if(c==7&&!d)//by Crab  Dave
            {
                m[10][a]=101;
                m[10][a+1]=0;
                m[10][a+2]=102;
                m[10][a+3]=103;
                m[10][a+4]=0;
                m[10][a+5]=104;
                m[10][a+6]=105;
            }
            if(!e)//星星
            {
                m[1][a]=201+rand()%6;
            }
            a+=c;
        }
    }
    else if(level==3)
    {
        while(a<=100030)
        {
            int b=rand()%10+1,c=rand()%5+3,h=rand()%5,f=rand()%10,d=rand()%50,e=rand()%30;
            for(register int j=a;j<=a+c;j++)
            {
                for(int i=1;i<=10;i++)
                    m[i][j]=0;
                m[0][j]=1;
                if(!h)//地面二层 
                    for(register int i=6;i<=6;i++)
                    {
                        if(b==3||b==2||b==1)m[i][j]=11;
                        else if(b==4||b==5||b==9)m[i][j]=13;
                        else if(b==6||b==7)m[i][j]=10;
                        else if(b==10&&c==3)m[i][j]=0;
                        else if(b==8||b==10)m[i][j]=1;
                    }
                if(!f)//地面三层 
                    for(register int i=3;i<=3;i++)
                        {
                            if(b==3||b==2||b==1)m[i][j]=11;
                            else if(b==4||b==5||b==9)m[i][j]=13;
                            else if(b==6||b==7)m[i][j]=10;
                            else if(b==10&&c==3)m[i][j]=0;
                            else if(b==8||b==10)m[i][j]=1;
                        }
                for(register int i=9;i<=10;i++)//地面一层 
                {
                    if(b==3||b==2||b==1)m[i][j]=11;
                    else if(b==4||b==5||b==9)m[i][j]=13;
                    else if(b==6||b==7)m[i][j]=10;
                    else if(b==10&&c==3)m[i][j]=0;
                    else if(b==8||b==10)m[i][j]=1;
                }
                int w=rand()%40;
                if(!w)//墙
                {
                    for(int i=1;i<=10;i++)
                        m[i][j]=1;
                    int en1=rand()%7+1,en2=rand()%7+1,en3=rand()%7+1;
                    m[en1][j]=m[en2][j]=m[en1][j+1]=m[en2][j+1]=m[en3][j]=m[en3][j+1]=0;
                } 
            }
            if(c==7&&!d)//by Crab  Dave
            {
                m[10][a]=101;
                m[10][a+1]=0;
                m[10][a+2]=102;
                m[10][a+3]=103;
                m[10][a+4]=0;
                m[10][a+5]=104;
                m[10][a+6]=105;
            }
            if(!e)//星星
            {
                m[1][a]=201+rand()%6;
            }
            a+=c;
        }
    }
    else if(level==4)
    {
        while(a<=100030)
        {
            int b=rand()%10+1,c=rand()%5+3,h=rand()%5,f=rand()%10,d=rand()%50,e=rand()%30;
            for(register int j=a;j<=a+c;j++)
            {
                for(int i=1;i<=10;i++)
                    m[i][j]=0;
                m[0][j]=1;
                if(!h)//地面二层 
                    for(register int i=6;i<=6;i++)
                    {
                        if(b==3||b==2||b==1)m[i][j]=11;
                        else if(b==4||b==5||b==9)m[i][j]=13;
                        else if(b==6||b==7)m[i][j]=10;
                        else if(b==10&&c==3)m[i][j]=0;
                        else if(b==8||b==10)m[i][j]=1;
                    }
                if(!f)//地面三层 
                    for(register int i=3;i<=3;i++)
                        {
                            if(b==3||b==2||b==1)m[i][j]=11;
                            else if(b==4||b==5||b==9)m[i][j]=13;
                            else if(b==6||b==7)m[i][j]=10;
                            else if(b==10&&c==3)m[i][j]=0;
                            else if(b==8||b==10)m[i][j]=1;
                        }
                for(register int i=9;i<=10;i++)//地面一层 
                {
                    if(b==3||b==2||b==1)m[i][j]=11;
                    else if(b==4||b==5||b==9)m[i][j]=13;
                    else if(b==6||b==7)m[i][j]=10;
                    else if(b==10&&c==3)m[i][j]=0;
                    else if(b==8||b==10)m[i][j]=1;
                }
                int w=rand()%30;
                if(!w)//墙
                {
                    for(int i=1;i<=10;i++)
                        m[i][j]=1;
                    int en1=rand()%7+1,en2=rand()%7+1,en3=rand()%7+1;
                    m[en1][j]=m[en2][j]=m[en1][j+1]=m[en2][j+1]=m[en3][j]=m[en3][j+1]=0;
                } 
            }
            if(c==7&&!d)//by Crab  Dave
            {
                m[10][a]=101;
                m[10][a+1]=0;
                m[10][a+2]=102;
                m[10][a+3]=103;
                m[10][a+4]=0;
                m[10][a+5]=104;
                m[10][a+6]=105;
            }
            if(!e)//星星
            {
                m[1][a]=204+rand()%3;
            }
            a+=c;
        }
    }
    m[8][21]=rand()%7+201;
//  m[8][21]=203;m[8][122]=203;m[8][223]=203;m[8][324]=203;m[8][425]=203;m[8][526]=203;m[8][627]=203;m[8][728]=203;m[8][829]=203;m[8][930]=203;
}
void FuHuo()
{
    speed=1,jump=0,yan=11,t=0,x=1,cnt=0,my=4,th=0,yq=0,aj=0,cz=0,xx=0,ww=0,win=0;
    y+=2;
    int a=score/100+1;
    y=score+1;
    while(score)
    {
        Go(2,0);
        for(register int i=1;i<=a;i++)
            if(y>1) y--;
        for(register int i=1;i<=a;i++)
            if(score) score--;
        for(register int i=1;i<=10;i++)
            {
                for(register int j=score;j<score+20;j++)
                    Print(i,j);
                printf("\n");
            }
        Go(0,0);color(15);
        printf("Score %d            ",score);
        color(15);
    }
    New(score+20);
    Sleep(1000);
    Go(0,0);color(yan);
    printf("Score       ");
    Go(1,0);color(yan);
    printf("Highest Score       ");
    color(15);
    int b=rand()%10;
    if(!b)
    {
        Go(x+2,(y-score)*2);
        Display("隐藏特效:吸星大法!",100,5);
        Sleep(300);
        Go(x+2,(y-score)*2);
        printf("               ");
        xx=1;
    }
}
void Start()
{
    Go(2,0);
    for(register int i=1;i<=10;i++)
    {
        for(register int j=score;j<score+20;j++)
            Print(i,j);
        printf("\n");
    }
    Sleep(400);
    Go(1,4);
    Display("欢迎来到多彩逗比v1.0ヽ( ̄▽ ̄)↗",125,5);
    Sleep(300);
    Go(2,4);
    Display("这里是教程关卡,是否跳过Y/N",100,0);
    Sleep(100);
    char g=_getch();
    if(g=='Y'||g=='y')return;

    system("cls");
    Go(0,0);
    Display("1.白色块■:万能块,随便走\n",25,0);
    Sleep(150);
    Display("2.彩色块■:踩在不同色块上无法前进,跳起来或变色是不错的选择\n",25,5);
    Sleep(150);
    Display("3.宝箱块★:打开有惊喜!\n",25,1);
    Sleep(150);
    Display("4.“↑”键跳跃,越跑越能跳~\n",25,5);
    Sleep(150);
    Display("5.“↓”键变色,咦我怎么变色了?!\n",25,5);
    Sleep(150);
    Display("6.Space键暂停,Enter键回主页!\n",25,5);
    Sleep(150);
    Display("7.1000分后进入无尽模式!\n",25,5);
    Sleep(150);
    Display("\n-=≡ヘ(  ·ω·)ノ准备好了吗,出发!\n",50,5);
    Sleep(150);
    system("color 08");
    system("color 19");
    system("color 2A");
    system("color 3B");
    system("color 4C");
    system("color 5E");
    system("color 6F");
    system("color 0F");
    system("color 08");
    system("color 19");
    system("color 2A");
    system("color 3B");
    system("color 4C");
    system("color 5E");
    system("color 6F");
    system("color 0F");
    system("color 08");
    system("color 19");
    system("color 2A");
    system("color 3B");
    system("color 4C");
    system("color 5E");
    system("color 6F");
    system("color 0F");

    system("cls");
}
int main()
{
    srand(unsigned(time(NULL)));
    ios::sync_with_stdio(false);
    CONSOLE_CURSOR_INFO cursor_info={1,0};
    SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info);
    system("mode con cols=41 lines=13");
    for(register int i=1;i<=15;i++) color(i),printf("■");
    system("cls");
    Start();

    x: 
    system("cls");
    printf("请选择模式:\n");
    color(7);
    printf("┏━━━━┓  ┏━━━━┓  ╔═╗\n");
    printf("┃一般模式┃  ┃正常模式┃  ║作║\n");
    printf("┗━━━━┛  ┗━━━━┛  ║者║\n");
    printf("┏━━━━┓  ┏━━━━┓  ║博║\n");
    printf("┃困难模式┃  ┃地狱模式┃  ║客║\n");
    printf("┗━━━━┛  ┗━━━━┛  ╚═╝\n");
    printf("┏━━━━━━━━━━━━━━━┓\n");
    printf("┃更多模式即将出品  (o゜▽゜)o☆┃\n");
    printf("┗━━━━━━━━━━━━━━━┛\n");
    while(1)
    {
        Sleep(10);
        mouse=GetAsyncKeyState(VK_LBUTTON)&0x8000;
        POINT pt=Windowpos();
        if(pt.x>=28&&pt.x<=33&&pt.y>=1&&pt.y<=6)
        {
            color(14);
            Go(1,28);
            printf("╔═╗");
            Go(2,28);
            printf("║作║");
            Go(3,28);
            printf("║者║");
            Go(4,28);
            printf("║博║");
            Go(5,28);
            printf("║客║");
            Go(6,28);
            printf("╚═╝");
            if(mouse)
            {
                HWND hWnd=FindWindow("ConsoleWindowClass",NULL);
                ShowWindow(hWnd,SW_HIDE);
                system("start https://www.luogu.org/blog/Crab-Dave233/");
                return 0;
            }
        }
        else
        {
            color(10);
            Go(1,28);
            printf("╔═╗");
            Go(2,28);
            printf("║作║");
            Go(3,28);
            printf("║者║");
            Go(4,28);
            printf("║博║");
            Go(5,28);
            printf("║客║");
            Go(6,28);
            printf("╚═╝");
        }
        if(pt.x>=0&&pt.x<=11&&pt.y>=1&&pt.y<=3)
        {
            if(Pass[1])color(14);
            else color(15);
            Go(1,0);
            printf("┏━━━━┓");
            Go(2,0);
            printf("┃一般模式┃");
            Go(3,0);
            printf("┗━━━━┛");
            if(mouse)
            {
                level=1;
                system("color 18");
                system("color 29"); 
                system("color 3A");
                system("color 4B");
                system("color 5C");
                system("color 6E");
                system("color 7F");
                system("color 0F");
                break;
            }
        }
        else
        {
            if(Pass[1])color(2);
            else color(7);
            Go(1,0);
            printf("┏━━━━┓");
            Go(2,0);
            printf("┃一般模式┃");
            Go(3,0);
            printf("┗━━━━┛");
        }
        if(pt.x>=14&&pt.x<=25&&pt.y>=1&&pt.y<=3)
        {
            if(Pass[2])color(14);
            else color(15);
            Go(1,14);
            printf("┏━━━━┓");
            Go(2,14);
            printf("┃正常模式┃");
            Go(3,14);
            printf("┗━━━━┛");
            if(mouse)
            {
                level=2;
                system("color 18");
                system("color 29"); 
                system("color 3A");
                system("color 4B");
                system("color 5C");
                system("color 6E");
                system("color 7F");
                system("color 0F");
                break;
            }
        }
        else
        {
            if(Pass[2])color(2);
            else color(7);
            Go(1,14);
            printf("┏━━━━┓");
            Go(2,14);
            printf("┃正常模式┃");
            Go(3,14);
            printf("┗━━━━┛");
        }
        if(pt.x>=0&&pt.x<=11&&pt.y>=4&&pt.y<=6)
        {
            if(Pass[3])color(14);
            else color(15);
            Go(4,0);
            printf("┏━━━━┓");
            Go(5,0);
            printf("┃困难模式┃");
            Go(6,0);
            printf("┗━━━━┛");
            if(mouse)
            {
                level=3;
                system("color 18");
                system("color 29"); 
                system("color 3A");
                system("color 4B");
                system("color 5C");
                system("color 6E");
                system("color 7F");
                system("color 0F");
                break;
            }
        }
        else
        {
            if(Pass[3])color(2);
            else color(7);
            Go(4,0);
            printf("┏━━━━┓");
            Go(5,0);
            printf("┃困难模式┃");
            Go(6,0);
            printf("┗━━━━┛");
        }
        if(pt.x>=14&&pt.x<=25&&pt.y>=4&&pt.y<=6)
        {
            if(Pass[4])color(14);
            else color(15);
            Go(4,14);
            printf("┏━━━━┓");
            Go(5,14);
            printf("┃地狱模式┃");
            Go(6,14);
            printf("┗━━━━┛");
            if(mouse)
            {
                level=4;
                system("color 18");
                system("color 29"); 
                system("color 3A");
                system("color 4B");
                system("color 5C");
                system("color 6E");
                system("color 7F");
                system("color 0F");
                break;
            }
        }
        else
        {
            if(Pass[4])color(2);
            else color(7);
            Go(4,14);
            printf("┏━━━━┓");
            Go(5,14);
            printf("┃地狱模式┃");
            Go(6,14);
            printf("┗━━━━┛");
        }
    }

    system("cls");
    Go(0,0);color(yan);
    printf("Score       ");
    Go(1,0);color(yan);
    printf("Highest Score       ");
    color(15);
    New(score+20);
    int b=rand()%10;
    if(!b)
    {
        Go(x+2,(y-score)*2);
        Display("隐藏特效:吸星大法!",100,5);
        Sleep(300);
        Go(x+2,(y-score)*2);
        printf("               ");
        xx=1;
    }
    while(1)
    {
        if(t==(42-speed)*450000)
        {
            if(score>=1000&&win==0)
            {
                Go(5,15);
                printf("You Win!");
                system("color 0E");
                Sleep(2000);
                system("color 0F");
                win=1;
                Go(5,10);
                Display("现在开启无尽模式",75,5);
                Pass[level]=1;
                Sleep(300);
            }
            if(x<0||x>9||y<score)
            {
                Go(5,15);
                system("color 7F");
                color(0x7c);
                printf("You Die!");
                Sleep(2000);
                system("color 0F");
                FuHuo();
            }
            if(m[x+1][y]!=0) cnt=0;
            if(xx)
                for(register int i=1;i<=10;i++)
                    for(register int j=score;j<score+20;j++)
                        if(m[i][j]>200&&x!=i)
                            m[x][j]=m[i][j],m[i][j]=0;
            if(m[x][y+1]>=201)
            {
                if(m[x][y+1]==201)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("突进!");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("      ");
                    m[x][y+1]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    my+=3;
                    if(my>=20) my=19;
                }
                else if(m[x][y+1]==202)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("同化!");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("      ");
                    m[x][y+1]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    th+=100;
                }
                else if(m[x][y+1]==203)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("正向跃迁!");
                    color(15);
                    Sleep(500);
                    Go(x,(y-score)*2+4);
                    printf("          ");
                    m[x][y+1]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    score+=100;
                    y+=100;
                    m[9][y]=1;
                    m[9][y+1]=1;
                    m[9][y+2]=1;
                    m[9][y+3]=1;
                    m[9][y+4]=1;
                    yq=1;
                }
                else if(m[x][y+1]==204)
                {
                    Go(x,(y-score)*2+4);
                    color(12);
                    printf("反向跃迁···");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("              ");
                    m[x][y+1]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    score-=100;
                    if(score<=0)score=0; 
                    y-=100;
                    if(y<=0)y=0;
                    m[9][y]=1;
                    m[9][y+1]=1;
                    m[9][y+2]=1;
                    m[9][y+3]=1;
                    m[9][y+4]=1;
                    yq=1;
                }
                else if(m[x][y+1]==205)
                {
                    Go(x,(y-score)*2+4);
                    if(aj)
                    {
                        color(14);
                        printf("按键正常!");
                        color(15);
                    }
                    else
                    {
                        color(12);
                        printf("按键紊乱···");
                        color(15);
                    }
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("              ");
                    m[x][y+1]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    aj=!aj;
                }
                else if(m[x][y+1]==206)
                {
                    Go(x,(y-score)*2+4);
                    color(12);
                    printf("超重···");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("          ");
                    m[x][y+1]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    cz=100;
                }
                else if(m[x][y+1]==207)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("无畏!");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("      ");
                    m[x][y+1]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    ww=101;
                }
            }
            if(m[x+1][y]>=201)
            {
                if(m[x+1][y]==201)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("突进!");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("      ");
                    m[x+1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    my+=3;
                    if(my>=20) my=19;
                }
                else if(m[x+1][y]==202)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("同化!");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("      ");
                    m[x+1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    th+=100;
                }
                else if(m[x+1][y]==203)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("正向跃迁!");
                    color(15);
                    Sleep(500);
                    Go(x,(y-score)*2+4);
                    printf("          ");
                    m[x+1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    score+=100;
                    y+=100;
                    m[9][y]=1;
                    m[9][y+1]=1;
                    m[9][y+2]=1;
                    m[9][y+3]=1;
                    m[9][y+4]=1;
                    yq=1;
                }
                else if(m[x+1][y]==204)
                {
                    Go(x,(y-score)*2+4);
                    color(12);
                    printf("反向跃迁···");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("              ");
                    m[x+1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    score-=100;
                    if(score<=0)score=0; 
                    y-=100;
                    if(y<=0)y=0;
                    m[9][y]=1;
                    m[9][y+1]=1;
                    m[9][y+2]=1;
                    m[9][y+3]=1;
                    m[9][y+4]=1;
                    yq=1;
                }
                else if(m[x+1][y]==205)
                {
                    Go(x,(y-score)*2+4);
                    if(aj)
                    {
                        color(14);
                        printf("按键正常!");
                        color(15);
                    }
                    else
                    {
                        color(12);
                        printf("按键紊乱···");
                        color(15);
                    }
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("              ");
                    m[x+1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    aj=!aj;
                }
                else if(m[x+1][y]==206)
                {
                    Go(x,(y-score)*2+4);
                    color(12);
                    printf("超重···");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("          ");
                    m[x+1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    cz=100;
                }
                else if(m[x+1][y]==207)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("无畏!");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("      ");
                    m[x+1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    ww=101;
                }
            }
            if(m[x-1][y]>=201)
            {
                if(m[x-1][y]==201)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("突进!");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("      ");
                    m[x-1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    my+=3;
                    if(my>=20) my=19;
                }
                else if(m[x-1][y]==202)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("同化!");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("      ");
                    m[x-1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    th+=100;
                }
                else if(m[x-1][y]==203)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("正向跃迁!");
                    color(15);
                    Sleep(500);
                    Go(x,(y-score)*2+4);
                    printf("          ");
                    m[x-1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    score+=100;
                    y+=100;
                    m[9][y]=1;
                    m[9][y+1]=1;
                    m[9][y+2]=1;
                    m[9][y+3]=1;
                    m[9][y+4]=1;
                    yq=1;
                }
                else if(m[x-1][y]==204)
                {
                    Go(x,(y-score)*2+4);
                    color(12);
                    printf("反向跃迁···");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("              ");
                    m[x-1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    score-=100;
                    if(score<=0)score=0; 
                    y-=100;
                    if(y<=0)y=0;
                    m[9][y]=1;
                    m[9][y+1]=1;
                    m[9][y+2]=1;
                    m[9][y+3]=1;
                    m[9][y+4]=1;
                    yq=1;
                }
                else if(m[x-1][y]==205)
                {
                    Go(x,(y-score)*2+4);
                    if(aj)
                    {
                        color(14);
                        printf("按键正常!");
                        color(15);
                    }
                    else
                    {
                        color(12);
                        printf("按键紊乱···");
                        color(15);
                    }
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("              ");
                    m[x-1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    aj=!aj;
                }
                else if(m[x-1][y]==206)
                {
                    Go(x,(y-score)*2+4);
                    color(12);
                    printf("超重···");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("          ");
                    m[x-1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    cz=100;
                }
                else if(m[x-1][y]==207)
                {
                    Go(x,(y-score)*2+4);
                    color(14);
                    printf("无畏!");
                    color(15);
                    Sleep(1000);
                    Go(x,(y-score)*2+4);
                    printf("      ");
                    m[x-1][y]=0;
                    system("color 18");
                    system("color 29"); 
                    system("color 3A");
                    system("color 4B");
                    system("color 5C");
                    system("color 6E");
                    system("color 7F");
                    system("color 0F");
                    ww=101;
                }
            }
            if(th>0)
            {
                for(register int i=1;i<=10;i++)
                    if((m[i][y]>=1&&m[i][y]<=15)&&m[i][y]!=yan) m[i][y]=yan;
                th--;
            }
            if(cz>0)
            {
                if(cz%2==0)
                    if(m[x+1][y+1]!=0)m[x+2][y]=m[x+1][y],m[x+1][y]=0,x++;
                cz--;
            }
            ww--;
            if(((m[x+1][y]==yan||m[x+1][y]==1||m[x+1][y]==0)&&m[x][y+1]==0)||ww>0||(m[x][y+1]>100&&m[x][y+1]<200))y++;
            if(((m[x+1][y]==yan||m[x+1][y]==1||m[x+1][y]==0)&&m[x][y+1]==0&&y<score+my))y++;
            if(jump>0)
            {
                if((m[x-1][y]==0||(m[x-1][y]>=101&&m[x-1][y]<=109))||(ww>0&&x>1)) x--,jump--;
                else jump--;
            }
            if(jump==0&&(m[x+1][y]==0||(m[x+1][y]>=101&&m[x+1][y]<=109)))x++;
            Go(2,0);
            for(register int i=1;i<=10;i++)
            {
                for(register int j=score;j<score+20;j++)
                    Print(i,j);
                printf("\n");
            }
            score++;
            if(speed<41&&score>=speed*50)speed++;
            Go(0,0);color(yan);printf("Score %d          ",score);color(15);
            Go(1,0);color(yan);printf("Highest Score %d        ",hscore=max(score,hscore));color(15);
            if(yq) Sleep(1000),yq=0;
            t=0;
            if(_kbhit())
            {
                char g=_getch(); 
                if(g==' ')Go(x,(y-score)*2),color(yan),system("pause"),Go(x,(y-score)*2),color(15),printf("                     ");
                if(aj)
                {
                    int a=rand()%10;
                    if(!a)
                    {
                        if(g==72)g=80;
                        else if(g==80)g=72;
                    }
                }
                if(g==72)if(jump==0&&cnt<score/500+2)x--,jump=4,cnt++;
                if(g==80)
                {
                    if(level==1||level==2)
                    {
                        if(yan==11)yan=13;
                        else if(yan==13)yan=11;
                    }
                    if(level==3||level==4)
                    {
                        if(yan==10)yan=11;
                        else if(yan==11)yan=13;
                        else if(yan==13)yan=10;
                    }
                }
                if(g==13)
                {
                    score=0,speed=1,jump=0,yan=11,t=0,x=1,y=1,cnt=0,my=4,th=0,yq=0,aj=0,cz=0,xx=0,hscore=0,ww=0,win=0;
                    goto x;
                }
            }
        }
        t++;
    }
    return 0;
}

  

锻炼手速小游戏
//版权声明:坐者系小跳蛙与Believe_r_
#include<bits/stdc++.h>
#include<windows.h>
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME)&0x8000)?1:0)
using namespace std;
int N=15,Numk=50,Numl=5,Numd=100,Nan=40,Hp=10,Bebc=15,Bebh=16,Bebb=10,squ=3;
struct node
{
    int x,y,vf,bv;
    inline void init() {x=rand()%N+1,y=rand()%N+1,bv=rand()%3+1;}
    inline void move() {x++;if(x>N) init(),x=1;}
}k[10005],l[10005],d[10005];
int x,y,hp,score,mp[25][25],udf,numc,numh,numb,bulc,bulh,bulb,lanf;
inline void add(int &x,int y) {x+=y,x=max(x,1),x=min(x,N);}
void color(int a) {SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);}
inline int read()
{
    int r=0;char c=getchar();
    while(c>'9'||c<'0') c=getchar();
    while(c>='0'&&c<='9') (r*=10)+=c-'0',c=getchar();
    return r;
}
inline void print(int x,int y,string s)
{
    HANDLE hOut;COORD pos;
    hOut=GetStdHandle(STD_OUTPUT_HANDLE),pos.X=y,pos.Y=x;
    SetConsoleCursorPosition(hOut,pos),cout<<s;
}
inline char check_press(int x)
{
    Sleep(100);
    for(int i=1;i<=10;i++) {if(KEY_DOWN(x)) return 1;Sleep(10);}
    return 0;
}
inline void set_windows(int x1,int y1,int x2,int y2)
{
    HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE);SMALL_RECT rc;
    rc.Left=x1,rc.Top=y1,rc.Right=x2,rc.Bottom=y2;
    SetConsoleWindowInfo(hOut, TRUE, &rc);
}
inline void disap_mouse()
{
    ShowCursor(false);
    HANDLE hOut=GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_CURSOR_INFO cci;
    GetConsoleCursorInfo(hOut,&cci);
    cci.bVisible=false;
    SetConsoleCursorInfo(hOut,&cci);
}
inline char check_die()
{
    for(int i=1;i<=Numk;i++) if(k[i].x==x&&k[i].y==y) return k[i].init(),k[i].x=1,0;
    return 1;
}
inline char check_luck()
{
    for(int i=1;i<=Numl;i++)
        if(l[i].x==x&&l[i].y==y)
        {
            l[i].init(),l[i].x=1;
            numc+=(rand()%10+5)*bulc;
            numh+=(rand()%5+5)*bulh;
            numb+=(rand()%5+5)*bulb;
            return 0;
        }
    return 1;
}
inline char check_dowm()
{
    for(int i=1;i<=Numd;i++)
		if(d[i].x==x&&d[i].y==y)
	    {
	        d[i].init(),d[i].x=1;
	        numc+=(rand()%10+5)*bulc;
	        numh+=(rand()%5+5)*bulh;
	        numb+=(rand()%5+5)*bulb;
	        return 0;
	    }
    return 1;
}
inline void move_thi()
{
    for(int i=1;i<=Numk;i++) if(k[i].vf==0) k[i].move();
    for(int i=1;i<=Numl;i++) if(l[i].vf==0) l[i].move();
    for(int i=1;i<=Numd;i++) if(d[i].vf==0) d[i].move();
}
inline char move_peo()
{
    char c=0;
    if(KEY_DOWN(87)&&!udf) add(x,-1),c=1;
    if(KEY_DOWN(38)&&!udf) add(x,-1),c=1;
    if(KEY_DOWN(104)&&!udf) add(x,-1),c=1;
    if(KEY_DOWN(87)||KEY_DOWN(38)||KEY_DOWN(104)) color(112),print(11,N+5,"↑"),color(7);else print(11,N+5,"↑");
    if(KEY_DOWN(83)&&!udf) add(x,1),c=1;
    if(KEY_DOWN(40)&&!udf) add(x,1),c=1;
    if(KEY_DOWN(101)&&!udf) add(x,1),c=1;
    if(KEY_DOWN(83)||KEY_DOWN(40)||KEY_DOWN(101)) color(112),print(15,N+5,"↓"),color(7);else print(15,N+5,"↓");
    if(KEY_DOWN(65)) add(y,-1),c=1;
    if(KEY_DOWN(37)) add(y,-1),c=1;
    if(KEY_DOWN(100)) add(y,-1),c=1;
    if(KEY_DOWN(65)||KEY_DOWN(37)||KEY_DOWN(100)) color(112),print(13,N+3,"←"),color(7);else print(13,N+3,"←");
    if(KEY_DOWN(68)) add(y,1),c=1;
    if(KEY_DOWN(39)) add(y,1),c=1;
    if(KEY_DOWN(102)) add(y,1),c=1;
    if(KEY_DOWN(68)||KEY_DOWN(39)||KEY_DOWN(102)) color(112),print(13,N+7,"→"),color(7);else print(13,N+7,"→");
    return c;
}
inline void die()
{
    system("cls"),print(0,0," ");
    if(lanf==1)
    {
        puts("ZDT : HaHaHaaaaa! YOU DIED!!!\n"),Sleep(1000);
        printf("YOU SCORE IS:%d\n\n",score),Sleep(1000);
    }
    if(lanf==0)
    {
        puts("ZDT:你终于知道 死 这个字怎么写了!!!\n"),Sleep(1000);
        printf("你的分数是:%d\n\n",score),Sleep(1000);
    }
    if(lanf==1) puts("TRY AGAIN?\n");
    if(lanf==0) puts("再来一局?\n");
}
inline void init()
{
    system("cls"),srand(time(0)),printf(" ");
    for(int i=1;i<=N;i++) printf("~");
    puts("");
    for(int i=1;i<=N;i++)
    {
        printf("|");
        for(int i=1;i<=N;i++) printf(" ");
        puts("|");
    }
    printf(" ");
    for(int i=1;i<=N;i++) printf("~");
    puts(""),x=N,y=N/2,hp=Hp,score=0,numc=Bebc*bulc,numh=Bebh*bulh,numb=Bebb*bulb;
    for(int i=1;i<=Numk;i++) k[i].init(),k[i].y=N+1,k[i].vf=k[i].bv-1;
    for(int i=1;i<=Numl;i++) l[i].init(),l[i].y=N+1,l[i].vf=l[i].bv-1;
    for(int i=1;i<=Numd;i++) d[i].init(),d[i].y=N+1,d[i].vf=d[i].bv-1;
    print(1,N+2," "),printf("The bloods you still have");
    print(3,N+2," "),printf("The score you have now is");
    print(5,N+2," "),printf("The normal bullet you have is");
    print(7,N+2," "),printf("The high bullet you have is");
    print(9,N+2," "),printf("The big bullet you have is");
    for(int i=1;i<=Hp/30;i++)
    {
        print(16+i,N+2,"-");
        for(int i=2;i<=30;i++) printf("-");
    }
    print(17+Hp/30,N+2,"-");
    for(int i=2;i<=Hp%30;i++) printf("-");
    print(x,y,"*");
}
inline void Begin()
{
    disap_mouse(),set_windows(10,10,80,50),system("cls");
    printf("\n"),printf("WELCOME TO THE GAME:\n"),color(14);
    printf(
    "\n"
    "BBBBee  U    U  L       FFFFFF  L     Y    Y \n"
    "B    B  U    U  L       F       L     Y    Y \n"
    "B    B  U    U  L       F       L      Y  Y \n"
    "BBBBBB  U    U  L       FFFFFF  L       YY \n"
    "B    B  U    U  L       F       L       YY \n"
    "B    B  U    U  L       F       L       YY \n"
    "BBBB^^   UUUU   LLLLLL  F       LLLLLL  YY \n"
    "\n"
    );
    color(12),printf("烤蛙出品,侵权必究!QWQ\n\nBelieve_R_ 赞助开发\n\n");
    color(7),Sleep(500),puts("PLEASE PRESS 'Enter' TO CONTINUE");
    while(1) {if(KEY_DOWN(13)) break;}
    Sleep(200),system("cls"),puts("Your Language?/你的语言?"),lanf=0;
    while(1)
    {
        print(2,0," ");
        if(lanf==1) puts("  中文  ");else color(112),puts("  中文  "),color(7);
        print(3,0," ");
        if(lanf==0) puts(" English ");else color(112),puts(" English"),color(7);
        if(KEY_DOWN(13)||KEY_DOWN(108)) break;
        if(KEY_DOWN(87)||KEY_DOWN(83)||KEY_DOWN(38)||KEY_DOWN(40)||KEY_DOWN(104)||KEY_DOWN(101)) lanf=1-lanf;
        Sleep(100);
    }
    int t=0;
    Sleep(200),system("cls");
    if(lanf==1) puts("Do you know the rule of the game?");
    if(lanf==0) puts("你知道此游戏的规则吗\n");
    while(1)
    {
        if(lanf==1)
        {
            print(2,0," ");
            if(t==1) puts(" Yes ");else color(112),puts(" Yes "),color(7);
            print(3,0," ");
            if(t==0) puts(" No ");else color(112),puts(" No "),color(7);
        }
        if(lanf==0)
        {
            print(2,0," ");
            if(t==1) puts(" 是 ");else color(112),puts(" 是 "),color(7);
            print(3,0," ");
            if(t==0) puts(" 否 ");else color(112),puts(" 否 "),color(7);
        }
        if(KEY_DOWN(13)||KEY_DOWN(108)) break;
        if(KEY_DOWN(87)||KEY_DOWN(83)||KEY_DOWN(38)||KEY_DOWN(40)||KEY_DOWN(104)||KEY_DOWN(101)) t=1-t;
        Sleep(100);
    }
    if(t==1)
    {
        Sleep(200),system("cls");
        if(lanf==1)
        {
            puts("Before playing this game please read these carefully:\n"),Sleep(500);
            puts("\n1. You'll be asked to input 7 game parameters before the game starts.\n"),Sleep(500);
            puts("\n2. The symbol '!' is the Upgrade Roadblock. If you didn't shut it off before it get to the botton, your bloods will -1!\n"),Sleep(500);
            puts("\n3. The symbol '&' is the obstacle which means you cannot let '*' touch the '#'.\n"),Sleep(500);
            puts("\n4. The symbol '+' is the midic which means you can recover by touching the '!'.\n"),Sleep(500);
            puts("\n5. At first, you will have some bloods. You must go further before you died!\n"),Sleep(500);
            puts("\n6. If you press 'Q', the bullets will be fired. But the bullets was limited, it only can be increased by touching '+'\n"),Sleep(500);
            puts("\n7. If you press 'Space', the system will give you a sighting telescope. But it can't earse the Roadblock\n"),Sleep(500);
            puts("\n\nHappy Games......  QwQ\n"),Sleep(500);
            puts("PLEASE PRESS 'Enter' TO CONTINUE");
        }
        if(lanf==0)
        {
            puts("在玩之前,请认真阅读以下提示:\n"),Sleep(500);
            puts("\n1. 你将输入7个游戏参数。\n"),Sleep(500);
            puts("\n2. 符号'!'是恐怖障碍物。如果你没有在它到达底部之前射掉它,你将会扣一滴血!\n"),Sleep(500);
            puts("\n3. 符号'&'是障碍物,一旦你自己('*')碰到障碍物,生命值将会掉1个单位!\n"),Sleep(500);
            puts("\n4. 符号'+'可以给你补血,每次你自己('*')碰到'!'会恢复1个单位!\n"),Sleep(500);
            puts("\n5. 一开始你会有n个单位的生命,你必须在生命值耗完之前获得最高的分数!\n"),Sleep(500);
            puts("\n6. 如果你按下'Q',将会发射子弹。但是子弹的数量是有限的,你有你碰到了'+'才会回血!\n"),Sleep(500);
            puts("\n7. 如果你按下'空格',将会调出瞄准镜。但是瞄准镜并不能清除障碍物!\n"),Sleep(500);
            puts("\n\nHappy Games......  QwQ\n"),Sleep(500);
            puts("请按回车键以继续!");
        }
    }
    while(1) {if(KEY_DOWN(13)) break;}
    system("cls");
}
inline void choose()
{
    int t=5;
    Sleep(200);
    if(lanf==1) puts("Please choose the Difficulty: \n");
    if(lanf==0) puts("请选择游戏难度:\n");
    while(1)
    {
        if(lanf==1)
        {
            print(2,0," ");
            if(t!=5) puts(" Quick: No bullets ");else color(112),puts(" Quick: No bullets "),color(7);
            print(3,0," ");
            if(t!=4) puts(" Peaceful: Please play within 'int'! ");else color(112),puts(" Peaceful: Please play within 'int'! "),color(7);
            print(4,0," ");
            if(t!=3) puts(" Easy: Suitable for the Freshmen ");else color(112),puts(" Easy: Suitable for the Freshmen! "),color(7);
            print(5,0," ");
            if(t!=2) puts(" Middle: Time to race! ");else color(112),puts(" Middle: Time to race! "),color(7);
            print(6,0," ");
            if(t!=1) puts(" Hard: Impossible to get 2500! ");else color(112),puts(" Hard: Impossible to get 2500! "),color(7);
            print(7,0," ");
            if(t!=0) puts(" User-Defined ");else color(112),puts(" User-Defined "),color(7);
        }
        if(lanf==0)
        {
            print(2,0," ");
            if(t!=5) puts(" 手速 [没有子弹!] ");else color(112),puts(" 手速 [没有子弹!] "),color(7);
            print(3,0," ");
            if(t!=4) puts(" 和平 [不要把int玩爆呀!] ");else color(112),puts(" 和平 [不要把int玩爆呀!] "),color(7);
            print(4,0," ");
            if(t!=3) puts(" 简单 [新手建议!] ");else color(112),puts(" 简单 [新手建议!] "),color(7);
            print(5,0," ");
            if(t!=2) puts(" 普通 [是时候比速度了!] ");else color(112),puts(" 普通 [是时候比速度了!] "),color(7);
            print(6,0," ");
            if(t!=1) puts(" 困难 [2500? 不可能的!] ");else color(112),puts(" 困难 [2500? 不可能的!] "),color(7);
            print(7,0," ");
            if(t!=0) puts(" 用户自定义 ");else color(112),puts(" 用户自定义 "),color(7);
        }
        if(KEY_DOWN(13)||KEY_DOWN(108)) break;
        if(KEY_DOWN(38)||KEY_DOWN(87)||KEY_DOWN(104)) t=(t+1)%6;
        if(KEY_DOWN(40)||KEY_DOWN(83)||KEY_DOWN(98)) t=(t+5)%6;
        Sleep(100);
    }
    Nan=40;
    if(t==5) {N=30,Numk=75,Numl=0,Numd=1,Hp=1,Bebc=Bebh=Bebb=0,bulc=bulh=bulb=0,squ=14;return;}
    if(t==4) {N=30,Numk=15,Numl=20,Numd=1,Hp=20,Bebc=500,Bebh=100,Bebb=100,bulc=bulh=bulb=1,squ=10;return;}
    if(t==3) {N=30,Numk=25,Numl=10,Numd=1,Hp=15,Bebc=100,Bebh=20,Bebb=20,bulc=bulh=bulb=1,squ=7;return;}
    if(t==2) {N=30,Numk=40,Numl=8,Numd=1,Hp=15,Bebc=20,Bebh=4,Bebb=2,bulc=bulh=bulb=1,squ=5;return;}
    if(t==1) {N=30,Numk=40,Numl=5,Numd=2,Hp=20,Bebc=10,Bebh=Bebb=0,bulc=bulh=bulb=1,squ=3;return;}
    system("cls"),t=0,Sleep(100);
    if(lanf==1) puts("Do you want to be able to shoot the bullets?");
    if(lanf==0) puts("请选择你能否发射狙击枪子弹!");
    while(1)
    {
        if(lanf==1)
        {
            print(2,0," ");
            if(t==1) puts(" Yes ");else color(112),puts(" Yes "),color(7);
            print(3,0," ");
            if(t==0) puts(" No ");else color(112),puts(" No "),color(7);
        }
        if(lanf==0)
        {
            print(2,0," ");
            if(t==1) puts(" 是 ");else color(112),puts(" 是 "),color(7);
            print(3,0," ");
            if(t==0) puts(" 否 ");else color(112),puts(" 否 "),color(7);
        }
        if(KEY_DOWN(13)||KEY_DOWN(108)) break;
        if(KEY_DOWN(87)||KEY_DOWN(83)||KEY_DOWN(38)||KEY_DOWN(40)||KEY_DOWN(104)||KEY_DOWN(101)) t=1-t;
        Sleep(100);
    }
    bulc=1-t,t=0,system("cls"),Sleep(100);
    if(lanf==1) puts("Do you want to be able to shoot the bullets?");
    if(lanf==0) puts("请选择你能否发射高射炮子弹!");
    while(1)
    {
        if(lanf==1)
        {
            print(2,0," ");
            if(t==1) puts(" Yes ");else color(112),puts(" Yes "),color(7);
            print(3,0," ");
            if(t==0) puts(" No ");else color(112),puts(" No "),color(7);
        }
        if(lanf==0)
        {
            print(2,0," ");
            if(t==1) puts(" 是 ");else color(112),puts(" 是 "),color(7);
            print(3,0," ");
            if(t==0) puts(" 否 ");else color(112),puts(" 否 "),color(7);
        }
        if(KEY_DOWN(13)||KEY_DOWN(108)) break;
        if(KEY_DOWN(87)||KEY_DOWN(83)||KEY_DOWN(38)||KEY_DOWN(40)||KEY_DOWN(104)||KEY_DOWN(101)) t=1-t;
        Sleep(100);
    }
    bulh=1-t,t=0,system("cls"),Sleep(100);
    if(lanf==1) puts("Do you want to be able to shoot the bullets?");
    if(lanf==0) puts("请选择你能否发射大炮子弹!");
    while(1)
    {
        if(lanf==1)
        {
            print(2,0," ");
            if(t==1) puts(" Yes ");else color(112),puts(" Yes "),color(7);
            print(3,0," ");
            if(t==0) puts(" No ");else color(112),puts(" No "),color(7);
        }
        if(lanf==0)
        {
            print(2,0," ");
            if(t==1) puts(" 是 ");else color(112),puts(" 是 "),color(7);
            print(3,0," ");
            if(t==0) puts(" 否 ");else color(112),puts(" 否 "),color(7);
        }
        if(KEY_DOWN(13)||KEY_DOWN(108)) break;
        if(KEY_DOWN(87)||KEY_DOWN(83)||KEY_DOWN(38)||KEY_DOWN(40)||KEY_DOWN(104)||KEY_DOWN(101)) t=1-t;
        Sleep(100);
    }
    bulb=1-t,t=0,system("cls"),Sleep(100);
    if(lanf==1) puts("Please choose your pattern\nIf you choose Pattern 1, you can go up and down, while Pattern 2 can't!\n");
    if(lanf==0) puts("请选择你的模式:\n如果你选择了模式1,你可以上下左右移动;而模式2只能左右移动!\n");
    while(1)
    {
        if(lanf==1)
        {
            print(3,0," ");
            if(t==1) puts(" Pattern 1:←↑↓→ ");else color(112),puts(" Pattern 1:←↑↓→ "),color(7);
            print(4,0," ");
            if(t==0) puts("  Pattern 2:←→  ");else color(112),puts("  Pattern 2:←→  "),color(7);
        }
        if(lanf==0)
        {
            print(3,0," ");
            if(t==1) puts(" 模式1:←↑↓→ ");else color(112),puts(" 模式1:←↑↓→ "),color(7);
            print(4,0," ");
            if(t==0) puts("  模式2:←→  ");else color(112),puts("  模式2:←→  "),color(7);
        }
        if(KEY_DOWN(13)||KEY_DOWN(108)) break;
        if(KEY_DOWN(87)||KEY_DOWN(83)||KEY_DOWN(38)||KEY_DOWN(40)||KEY_DOWN(104)||KEY_DOWN(101)) t=1-t;
        Sleep(100);
    }
    udf=t;
    system("cls"),t=-1;
    while(t<3||t>35)
    {
        if(lanf==1) puts("Please Input an Integer: The Size of the Game(from 3 to 35):\n");
        if(lanf==0) puts("请输入一个整数:游戏界面的大小(3 ~ 35)\n");
        print(2,0," "),t=read(),N=t,system("cls");
    }
    system("cls"),t=-1;
    while(t<1||90<t)
    {
        if(lanf==1) puts("Please Input an Integer: The Number of Bullets(from 1 to 90):\n");
        if(lanf==0) puts("请输入一个整数:障碍物的数量(1 ~ 90)\n");
        print(2,0," "),t=read(),Numk=t,system("cls");
    }
    system("cls"),t=-1;
    while(t<1||90<t)
    {
        if(lanf==1) puts("Please Input an Integer: The Number of Backpack(from 1 to 90):\n");
        if(lanf==0) puts("请输入一个整数:回血包的数量(1 ~ 90)\n");
        print(2,0," "),t=read(),Numl=t,system("cls");
    }
    system("cls"),t=-1;
    while(t<1||90<t)
    {
        if(lanf==1) puts("Please Input an Integer: The Number of Upgrade Bullets(from 1 to 90):\n");
        if(lanf==0) puts("请输入一个整数:恐怖障碍物的数量(1 ~ 90)\n");
        print(2,0," "),t=read(),Numd=t,system("cls");
    }
    system("cls"),t=-1;
    while(t<1||t>100)
    {
        if(lanf==1) puts("Please Imput an Integer: The Total HP of You(from 1 to 100):\n");
        if(lanf==0) puts("请输入一个整数:初始生命值(1 ~ 100)\n");
        print(2,0," "),t=read(),Hp=t,system("cls");
    }
    system("cls"),t=-1;
    while(t<1||t>100)
    {
        if(lanf==1) puts("Please Input an Integer: The Bullet You Have at First(from 1 to 100):\n");
        if(lanf==0) puts("请输入一个整数:初始狙击枪子弹数(1 ~ 100)\n");
        print(2,0," "),t=read(),Bebc=t,system("cls");
    }
    system("cls"),t=-1;
    while(t<1||t>100)
    {
        if(lanf==1) puts("Please Input an Integer: The Bullet You Have at First(from 1 to 100):\n");
        if(lanf==0) puts("请输入一个整数:初始高射炮子弹数(1 ~ 100)\n");
        print(2,0," "),t=read(),Bebh=t,system("cls");
    }
    system("cls"),t=-1;
    while(t<1||t>100)
    {
        if(lanf==1) puts("Please Input an Integer: The Bullet You Have at First(from 1 to 100):\n");
        if(lanf==0) puts("请输入一个整数:初始大炮子弹数(1 ~ 100)\n");
        print(2,0," "),t=read(),Bebb=t,system("cls");
    }
}
inline void work()
{
    init();
    int die=1,luck=1,dowm=1,t;
    while(1)
    {
        for(int i=1;i<=Numk;i++) (k[i].vf+=1)%=k[i].bv;
        for(int i=1;i<=Numl;i++) (l[i].vf+=1)%=l[i].bv;
        for(int i=1;i<=Numd;i++) (d[i].vf+=1)%=d[i].bv;
        for(int i=1;i<=Numk;i++) if(k[i].y<=N&&k[i].x>0&&k[i].vf==0) print(k[i].x,k[i].y," ");
        for(int i=1;i<=Numl;i++) if(l[i].y<=N&&l[i].x>0&&l[i].vf==0) print(l[i].x,l[i].y," ");
        for(int i=1;i<=Numd;i++) if(d[i].y<=N&&d[i].x>0&&d[i].vf==0) print(d[i].x,d[i].y," ");
        t=0; 
        if(!udf&&(KEY_DOWN(87)||KEY_DOWN(38)||KEY_DOWN(104))) t=1;
        if(!udf&&(KEY_DOWN(83)||KEY_DOWN(40)||KEY_DOWN(101))) t=1;
        if(KEY_DOWN(65)||KEY_DOWN(37)||KEY_DOWN(100)) t=1;
        if(KEY_DOWN(68)||KEY_DOWN(39)||KEY_DOWN(102)) t=1;
        if(t) print(x,y," ");move_thi(),move_peo();
        for(int i=1;i<=Numk;i++) if(k[i].y<=N&&k[i].x>0&&k[i].vf==0) color(4),print(k[i].x,k[i].y,"&"),color(7);
        for(int i=1;i<=Numl;i++) if(l[i].y<=N&&l[i].x>0&&l[i].vf==0) color(2),print(l[i].x,l[i].y,"+"),color(7);
        for(int i=1;i<=Numd;i++) if(d[i].y<=N&&d[i].x>0&&d[i].vf==0) color(14),print(d[i].x,d[i].y,"!"),color(7);
        if(t) print(x,y,"*");
        die=check_die(),luck=check_luck(),dowm=check_dowm();
        if(!luck) print(hp/30+17,N+2+hp%30,"-"),hp++,score+=20,(numc+=rand()%10+5)*=bulc,(numh+=rand()%5+5)*=bulh,(numb+=rand()%5)*=bulb;
        if(!die) print((hp-1)/30+17,N+2+(hp-1)%30," "),hp--,score--;
        if(!dowm) score+=50;
        if((!die||!luck||!dowm)&&!t) print(x,y,"*");
        if(hp<=0) return;
        int xx=0,xw=1,yy=0,_90=0,_88=0,_67=0,_32=0;
        for(int i=1;i<=Numk;i++) if(k[i].y==y&&xx<k[i].x&&k[i].x<x) xx=k[i].x,yy=k[i].y,xw=i;
        for(int i=1;i<=Numl;i++) if(l[i].y==y&&xx<l[i].x&&l[i].x<x) xx=l[i].x,yy=l[i].y,xw=i+Numk;
        for(int i=1;i<=Numd;i++) if(d[i].y==y&&xx<d[i].x&&d[i].x<x) xx=d[i].x,yy=d[i].y,xw=i+Numk+Numl;
        if(KEY_DOWN(32)) {for(int i=x-1;i>xx;i--) print(i,y,"|");_32=1,color(112),print(15,N+8," Space "),color(7);}else print(15,N+8," Space ");
        if(KEY_DOWN(90)&&numc>0)
        {
            numc--,color(112),print(13,N+9," Z "),color(7),_90=1;
            if(xx!=0&&numc>0) for(int i=x-1;i>=xx;i--) print(i,y,"|");
        }
        else print(13,N+9," Z ");
        if(KEY_DOWN(88)&&numh>0)
        {
            numh--,color(112),print(13,N+12," X "),color(9),_88=1;
            if(xx!=0&&numc>0) for(int i=x-1;i>=1;i--) print(i,y,"|");
            color(7);
        }
        else print(13,N+12," X ");
        if(KEY_DOWN(67)&&numb>0)
        {
            numb--,color(112),print(13,N+15," C "),color(12),_67=1;
            if(xx!=0&&numc>0) for(int i=x-1;i>=xx;i--) print(i,y,"|");
            color(7);
        }
        else print(13,N+15," C ");
        for(int i=N+28;i<=N+35;i++) print(1,i," ");
        for(int i=N+28;i<=N+35;i++) print(3,i," ");
        for(int i=N+33;i<=N+38;i++) print(5,i," ");
        for(int i=N+31;i<=N+36;i++) print(7,i," ");
        for(int i=N+30;i<=N+36;i++) print(9,i," ");
        print(1,N+29,":"),printf("%d",hp);
        print(3,N+29,":"),printf("%d",score);
        print(5,N+33,":"),printf("%d",numc);
        print(7,N+31,":"),printf("%d",numh);
        print(9,N+30,":"),printf("%d",numb);
        Sleep(Nan);
        if(_32==1) {for(int i=x-1;i>xx;i--) print(i,y," ");}
        if(xx!=0&&_90)
        {
            for(int i=x;i>=xx;i--) print(i,y," ");
            if(xw<=Numk) k[xw].init(),k[xw].x=0,score++;
            else if(xw<=Numk+Numl) l[xw-Numk].init(),l[xw-Numk].x=0,score+=20;
            else d[xw-Numk-Numl].init(),d[xw-Numk-Numl].x=0,score++,(numc+=rand()%10+5)*=bulc,(numh+=rand()%5+5)*=bulh,(numb+=rand()%5)*=bulb;
        }
        if(_88)
        {
            for(int i=x;i>=1;i--) print(i,y," ");
            for(int i=1;i<=Numk;i++) if(k[i].y==y) k[i].init(),k[i].x=0,score++;
            for(int i=1;i<=Numl;i++) if(l[i].y==y) l[i].init(),l[i].x=0,score+=20;
            for(int i=1;i<=Numd;i++) if(d[i].y==y) d[i].init(),d[i].x=0,score++,(numc+=rand()%10+5)*=bulc,(numh+=rand()%5+5)*=bulh,(numb+=rand()%5)*=bulb;
        }
        if(xx!=0&&_67)
        {
            for(int i=x;i>=1;i--) print(i,y," ");
            for(int i=1;i<=Numk;i++)
                if(k[i].y>=yy-squ&&k[i].y<=yy+squ&&k[i].x>=xx-squ&&k[i].x<=xx+squ&&k[i].x>=1&&k[i].y<=N)
                    print(k[i].x,k[i].y," "),k[i].init(),k[i].x=0,score++;
            for(int i=1;i<=Numl;i++)
                if(l[i].y>=yy-squ&&l[i].y<=yy+squ&&l[i].x>=xx-squ&&l[i].x<=xx+squ&&l[i].x>=1&&k[i].y<=N)
                    print(l[i].x,l[i].y," "),l[i].init(),l[i].x=0,score++;
            for(int i=1;i<=Numd;i++)
                if(d[i].y>=yy-squ&&d[i].y<=yy+squ&&d[i].x>=xx-squ&&d[i].x<=xx+squ&&d[i].x>=1&&k[i].y<=N)
                    print(d[i].x,d[i].y," "),d[i].init(),d[i].x=0,score++,(numc+=rand()%10+5)*=bulc,(numh+=rand()%5+5)*=bulh,(numb+=rand()%5)*=bulb;
        }
        score++;
    }
}
int main()
{
    Begin();
    while(1)
    {
        choose(),work(),die();int t=0;
        while(1)
        {
            if(lanf==1)
            {
                print(5,0," ");
                if(t==1) puts(" Yes ");else color(112),puts(" Yes "),color(7);
                print(6,0," ");
                if(t==0) puts(" No ");else color(112),puts(" No "),color(7);
            }
            if(lanf==0)
            {
                print(5,0," ");
                if(t==1) puts(" 是 ");else color(112),puts(" 是 "),color(7);
                print(6,0," ");
                if(t==0) puts(" 否 ");else color(112),puts(" 否 "),color(7);
            }
            if(KEY_DOWN(13)||KEY_DOWN(108)) break;
            if(KEY_DOWN(87)||KEY_DOWN(83)||KEY_DOWN(38)||KEY_DOWN(40)||KEY_DOWN(104)||KEY_DOWN(101)) t=1-t;
            Sleep(100);
        }
        if(t==1) return 0;
        system("cls");
    }
}

  

双人技能大作战
#include<iomanip>
#include<iostream>
#include<conio.h>
#include<windows.h>
#include<cstdio>
#include<vector>
#include<cstring>
#include<string>
 #define bottom 40
#define jumph 6
#define skills 6
#define skilled 2
#define Setcolor(NAME) if(NAME)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_RED | FOREGROUND_INTENSITY | BACKGROUND_INTENSITY | BACKGROUND_GREEN | BACKGROUND_BLUE);else SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_BLUE | FOREGROUND_INTENSITY | BACKGROUND_INTENSITY | BACKGROUND_GREEN | BACKGROUND_BLUE)
#define Backcolor(NAME) if(NAME)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_BLUE | FOREGROUND_INTENSITY | BACKGROUND_INTENSITY | BACKGROUND_GREEN | BACKGROUND_BLUE)
#define Choosecolor(NAME) if(NAME==2)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED| FOREGROUND_GREEN|FOREGROUND_BLUE | FOREGROUND_INTENSITY|BACKGROUND_BLUE );else if(!NAME)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_BLUE | FOREGROUND_RED| BACKGROUND_INTENSITY| BACKGROUND_GREEN|BACKGROUND_RED|BACKGROUND_BLUE );else if(NAME==1)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_BLUE | FOREGROUND_INTENSITY | BACKGROUND_INTENSITY| BACKGROUND_GREEN|BACKGROUND_RED)
 using namespace std;
 void HideCursor();
void go(int x, int y);
void movewindow();
void GetContain();
void start1();
void start2();
void _skillprint(int, int);
void skillprint(int,int);
void mapprint();
void Getmove();
void winprint(bool);
void BoomGet();
class bullet;
class player;
 bool dj1, dj2, s11, s12, s21, s22;
int da1, da2,skill1[2] = { 4,3 }, skill2[2] = {2,4}, boom1, boom2, cost[10] = {0,3,3,5,15},place[11][2][2],explace[11][2];//[???üêy×?][ê?óú][x,y×?±ê]
float cool[2][2];
char hit[2]; 
string name1, name2,contain[11],excontain[11];
vector<bullet>bu;
class player {
public:
int x, y, j, jh, life,loving,flying,gaying;
char a, b[2];
bool dir, fly, myself,fdir;
//dir£o0?a×ó£?1?aóò
void clear() {
go(x, y);
printf(" ");
go(x, y + 1);
printf(" ");
}
void print() {
Setcolor(myself);
if (gaying)SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_BLUE|FOREGROUND_RED | BACKGROUND_INTENSITY | BACKGROUND_GREEN | BACKGROUND_BLUE);
go(x, y);
if (loving) {
Setcolor(!myself);
cout << (char)3;
Setcolor(myself);
}
else if (gaying)cout << "?á";
else cout << a;
go(x, y + 1);
cout << b[dir];
Backcolor(myself);
}
void lifedown(int l) {
if (!myself) {
go(life - l+1, 2);
for (int i = 1; i <= l; ++i)
cout << " ";
}
else {
go(188 - life, 2);
for (int i = 1; i <= l; ++i)
cout << " ";
}
life -= l;
}
void jump() {
++j;
if (j <= jh) {
clear();
--y;
print();
}
else fly = 1;
}
void flown() {
++flying;
clear();
if (flying <= jumph-1)--y;
else if (flying <= 2 * jumph-2)++y;
else flying = 0;
if (!fdir)x-=2;
else x+=2;
if (x < 1)x = 1;
else if (x > 188)x = 188;
print();
}
void skill(int,bool);
void attack();
void move(int);
} p1, p2;
class bullet {
public:
int x, y, boom,length,soap;
bool own, dir, love;
inline void clear() {
go(x, y);
cout << " ";
}
void print() {
Setcolor(own);
go(x, y);
if (boom)cout << (char)15;
else if (love)cout << (char)3;
else if (soap) cout << "¨|";
else cout << hit[own];
Backcolor(own);
}
void start(int p, int q, bool d, bool o) {
y = q;
dir = d;
own = o;
if (!d)x = p - 1;
else x = p + 1;
boom = 0;
love = 0;
length = 0;
soap = 0;
}
void boomstart(int p, int q, bool d, bool o,int l) {
y = q + 1;
dir = d;
own = o;
if (!d)x = p - 1;
else x = p + 1;
boom = 1;
length = l;
love = 0;
}
bool fly() {
if (boom >= 800) {
if (boom == 805) {
for (int i = -4; i <= 4; i += 2)
for (int j = -2; j <= 2; ++j) {
if (x + i < 1 || x + i>188 || y + j > bottom + 1)continue;
go(x + i, y + j);
cout << " ";
}
p1.print();
p2.print();
return 1;
 }++boom;
return 0;
}
if(soap!=-1)clear();
if (!dir)--x;
else ++x;
if (boom) {
if (!dir)x-=length;
else x+=length;
}
if (boom) {
++boom;
char _sign = 4;
if (x < 1 || x>188) {
Setcolor(own);
for (int i = -4; i <= 4; i += 2)
for (int j = -2; j <= 2; ++j) {
if (x + i < 1 || x + i>188 || y + j > bottom + 1)continue;
go(x + i, y + j);
cout <<_sign ;
}
Backcolor(own);
if (!own)
{
if (x >= p2.x - 4 && x <= p2.x + 4 && y+2 >= p2.y&&y-2 <= p2.y + 1) {
p2.lifedown(10);
if (x > p2.x)p2.fdir = 0;
else p2.fdir = 1;
p2.flown();
}
}
else {
if (x >= p1.x - 4 && x <= p1.x + 4 && y + 2 >= p1.y&&y - 2 <= p1.y + 1) {
p1.lifedown(10);
if (x >= p1.x)p1.fdir = 0;
else p1.fdir = 1;
p1.flown();
}
}
boom = 800;
return 0;
}
if (boom <= 2 * jumph+length)--y;
else if (boom > 2 * jumph + 2+length) {
if (y <= bottom)++y;
else {
Setcolor(own);
for (int i = -4; i <= 4; i += 2)
for (int j = -2; j <= 2; ++j) {
if (x + i < 1 || x + i>188 || y + j > bottom + 1)continue;
go(x + i, y + j);
cout << _sign;
}
Backcolor(own);
if (!own) {
if (x >= p2.x - 4 && x <= p2.x + 4 && y +2>= p2.y&&y-2 <= p2.y + 1) {
p2.lifedown(10);
if (x > p2.x)p2.fdir = 0;
else p2.fdir = 1;
p2.flown();
}
}
else {
if (x >= p1.x - 4 && x <= p1.x + 4 && y + 2 >= p1.y&&y - 2 <= p1.y + 1) {
p1.lifedown(10);
if (x >= p1.x)p1.fdir = 0;
else p1.fdir = 1;
p1.flown();
}
}
boom = 800;
return 0;
}
}
print();
if (!own) {
if (x == p2.x&&y >= p2.y&&y <= p2.y + 1) {
for (int i = -4; i <= 4; i += 2)
for (int j = -2; j <= 2; ++j) {
if (x + i < 1 || x + i>188 || y + j > bottom + 1)continue;
go(x + i, y + j);
cout << _sign;
}
p2.lifedown(10);
p2.fdir = 1;
p2.flown();
boom = 800;
}
}
else {
if (x == p1.x&&y >= p1.y&&y <= p1.y + 1) {
Setcolor(own);
for (int i = -4; i <= 4; i += 2)
for (int j = -2; j <= 2; ++j) {
if (x + i < 1 || x + i>188 || y + j > bottom + 1)continue;
go(x + i, y + j);
cout << _sign;
}
Backcolor(own);
p1.lifedown(10);
p1.fdir = 0;
p1.flown();
boom = 800;
}
}
return 0;
}
if (soap) {
if (soap!=-1&&soap <= 2) {
++soap;
--y;
}
else if (soap != -1 && y <= bottom+1) {
++y;
if (y == bottom + 1) 
soap = -1; 
}
else {
if (!dir)++x;
else --x;
}
if (x < 1)x = 1;
if (x > 188)x = 188;
if (soap != -1) {
int s = bu.size();
for (register int i = 0; i < s; ++i) {
if (bu[i].soap&&bu[i].length!=length) {
if (x+1>=bu[i].x&&x<=bu[i].x+1&&y ==bu[i].y-1 ) { 
soap = -1;
break;
}
}
}
} 
if (!own) {
if (x+1 >= p2.x&&x<=p2.x&&y >= p2.y&&y <= p2.y + 1) {
p2.lifedown(8);
p2.gaying += 100;
p2.print();
return 1;
}
}
else {
if (x +1>= p1.x&&x<=p1.x&&y >= p1.y&&y <= p1.y + 1) {
p1.lifedown(8);
p1.gaying += 100;
p1.print();
return 1;
}
}
print();
return 0;
}
if (x < 1 || x>188) {
if (!love) {
if (!own) {
if ((skill1[0] == -2 || skill1[1] == -2) && !length) {
if (!dir)
++x;
else --x;
dir = !dir;
++length;
return 0;
}
}
else {
if ((skill2[0] == -2 || skill2[1] == -2) && !length) {
if (!dir)++x;
else --x;
dir = !dir;
++length;
return 0;
}
}
}
return 1;
}
if (!own) {
if (x == p1.x&&y >= p1.y&&y <= p1.y + 1)p1.print();
if (x == p2.x&&y >= p2.y&&y <= p2.y + 1) {
if (love) {
p2.lifedown(3);
p2.loving = 75;
p2.print();
}
else p2.lifedown(1);
return 1;
}
}
else {
if (x == p2.x&&y >= p2.y&&y <= p2.y + 1)p2.print();
if (x == p1.x&&y >= p1.y&&y <= p1.y + 1) {
if (love) {
p1.lifedown(3);
p1.loving = 75;
p1.print();
}
else p1.lifedown(2);
return 1;
}
}
print();
return 0;
 }
}temp;
void player::attack() {
temp.start(x, y, dir, myself);
bu.push_back(temp);
}
void player::move(int k) {
clear();
if (gaying)k = 3 - k;
if (k == 1) {
--x;
dir = 0;
}
else if (k == 2) {
++x;
dir = 1;
}
int strb = bu.size();
for (register int i = 0; i < strb; ++i) {
if (bu[i].boom == 0 && bu[i].own != myself && bu[i].x == x && bu[i].y >= y && bu[i].y <= y + 1) {
bu.erase(bu.begin() + i);
if (bu[i].soap) {
gaying += 100;
lifedown(5);
}
else if (bu[i].love) {
lifedown(2);
loving =75;
}
else lifedown(1);
--i;
--strb;
}
}
print();
}
void player::skill(int l,bool which) {
if (l <= 0)return;
if (cool[myself][which] > 0)return;
cool[myself][which] += cost[l];
skillprint(myself, which);
/*£?éá??£?*/
if (l == 1) {
int sign = 0;
bool sign2 = 0;
if (!dir) {
for (register int i = 1; x > 1 && i <= 12; ++i) {
x -= 2;
if (x < 1) {
x = 1;
sign2 = 1;
}
print();
++sign;
}
for (register int i = 2 - sign2; i <= 2 - sign2 + 2 * sign; i += 2) {
go(x + i, y);
cout << " ";
go(x + i, y + 1);
cout << " ";
Sleep(1);
}
}
else {
for (register int i = 1; x < 188 && i <= 12; ++i) {
x += 2;
if (x > 188) {
x = 188;
sign2 = 1;
}
print();
++sign;
}
for (register int i = 2 - sign2; i <= 2 - sign2 + 2 * sign; i += 2) {
go(x - i, y);
cout << " ";
go(x - i, y + 1);
cout << " ";
Sleep(1);
}
}
}
else if (l == 2) {
if(!myself)temp.boomstart(x, y, dir, myself,boom1/6);
else temp.boomstart(x, y, dir, myself, boom2 /6);
bu.push_back(temp);
}
else if (l == 3) {
temp.start(x, y, dir, myself);
temp.love = 1;
bu.push_back(temp);
}
else if (l == 4) {
temp.start(x, y, dir, myself);
temp.soap = 1;
temp.length = rand();
bu.push_back(temp);
}
}
 void go(int x, int y) {
COORD p;
p.X = x - 1;
p.Y = y - 1;
SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), p);
}
void movewindow() {
RECT rect;
HWND hwnd = GetForegroundWindow();
GetWindowRect(hwnd, &rect);
MoveWindow(hwnd, 0, 0, 0, 0, TRUE);
}
void HideCursor() {
CONSOLE_CURSOR_INFO cursor_info = { 1, 0 };
SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
}
void start1() {
go(20, 20);
printf("玩家一的名字:");
getline(cin, name1);
go(20, 23);
printf("玩家二的名字");
getline(cin, name2);
Sleep(500);
system("cls");
}
inline void GetContain() {
contain[1] = "| 闪现 |";
contain[2] = "| 手雷 |";
contain[3] = "| 魅惑 |";
contain[4] = "| 捡肥皂 |";
contain[5] = "| 三段跳 |";
contain[6] = "| 弹射 |";
excontain[1] = "向前瞬移一段距离 冷却 3 s";
excontain[2] = "长摁后扔出一枚手雷,造成伤害并炸飞对手。蓄力时间越长,飞行距离越远 冷却 3 s";
excontain[3] = "发出一颗爱心,造成伤害并使对手无法控制地走向自己 冷却 5 s";
excontain[4] = "扔出一个肥皂,对手捡到时造成伤害并干扰对手的移动 冷却 15 s";
excontain[5] = "(被动)可以连续跳跃三次";
excontain[6] = "(被动)普通攻击第一次碰到墙壁时会反弹回来";
place[1][0][0] = 25;
place[1][0][1] = 10;
place[1][1][0] = place[1][0][0]+85;
place[1][1][1] = 10;
for (int k = 0; k <= 1; ++k) {
for (int i = 2; i <= skills; ++i) {
place[i][k][0] = place[i - 1][k][0];
place[i][k][1] = place[i - 1][k][1] + 3;
}
}
for (int k = 0; k <= 1; ++k)
for (int i = 1; i <= skills; ++i)
explace[i][k] = place[1][k][0]+18 - excontain[i].size()/2;
}
void start2() {
GetContain();
const int exy = place[skills][0][1]+5;
int wh[2] = {1,1};
int ch[2][11] = { {0,1,0,0,0,0,0,0,0,0,0},{0,1,0,0,0,0,0,0,0,0,0,}};
int count[2] = { 0,0 };
char sign = 16;
go(82, 2);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), BACKGROUND_BLUE|BACKGROUND_GREEN|BACKGROUND_INTENSITY);
cout << "选择你的技能";
go(54, 45);
cout << "游戏规则:玩家一 A、D键移动,W键跳跃,J键攻击,K、L键释放技能";
go(64, 46);
cout << "玩家二 方向键跳跃和移动,1 键攻击,2、3 键释放技能";
Setcolor(0);
go(44 - name1.size()/2, 5);
cout<<name1;
go(44, 7);
printf("%c", p1.a);
go(44, 8);
printf("%c", p1.b[0]);
Setcolor(1);
go(130-name2.size()/2,5);
cout<< name2;
go(130, 7);
printf("%c", p2.a);
go(130, 8);
printf("%c", p2.b[0]);
for(int i=0;i<=1;++i)
for (int j = 1; j <= skills; ++j) {
go(place[j][i][0], place[j][i][1]);
Setcolor(i);
cout << " ";
Choosecolor(ch[i][j]);
cout << contain[j];
}
Choosecolor(1);
for (int i = 0; i <= 1; ++i) {
go(place[1][i][0], place[1][i][1]);
Setcolor(i);
cout<<sign;
go(explace[1][i], exy);
cout << excontain[1];
}
bool able[2][3] = { {0,0,0},{0,0,0} };//[0×ó 1óò][0é? 1?? 2??]
go(30, 40);
Setcolor(0);
cout << "玩家一:W、S键移动,J键选择";
go(112, 40);
Setcolor(1);
cout << "玩家二:I、K键移动,L键选择";
while (count[0]<2||count[1]<2) {
bool f = 0;
if (GetKeyState('W') >= 0)able[0][0]=1;
if (GetKeyState('S') >= 0)able[0][1] = 1;
if (GetKeyState('J') >= 0)able[0][2] = 1;
if (GetKeyState('I') >= 0)able[1][0] = 1;
if (GetKeyState('K') >= 0)able[1][1] = 1;
if (GetKeyState('L') >= 0)able[1][2] = 1;
Sleep(5);
if (GetKeyState('W') < 0&&able[f][0]) {
if(ch[f][wh[f]]!=2)--ch[f][wh[f]];
able[f][0] = 0;
go(place[wh[f]][f][0], place[wh[f]][f][1]);
Setcolor(f);
cout << " ";
Choosecolor(ch[f][wh[f]]);
cout << contain[wh[f]];
Setcolor(f);
go(explace[wh[f]][f], exy);
for (unsigned int i = 0; i < excontain[wh[f]].size()/2+1; ++i)
cout << " ";
--wh[f];
if (wh[f] < 1)wh[f] = skills;
go(explace[wh[f]][f], exy);
cout << excontain[wh[f]];
if(ch[f][wh[f]]!=2)++ch[f][wh[f]];
go(place[wh[f]][f][0], place[wh[f]][f][1]);
cout << sign;
Choosecolor(ch[f][wh[f]]); 
cout << contain[wh[f]];
}
if(GetKeyState('S')<0&&able[f][1]) {
if(ch[f][wh[f]]!=2)--ch[f][wh[f]];
able[f][1] = 0;
go(place[wh[f]][f][0], place[wh[f]][f][1]);
Setcolor(f);
cout << " ";
Choosecolor(ch[f][wh[f]]);
cout<< contain[wh[f]];
Setcolor(f);
go(explace[wh[f]][f], exy);
for (unsigned int i = 0; i < excontain[wh[f]].size()/2+1; ++i)
cout << " ";
++wh[f];
if (wh[f] > skills)wh[f] = 1;
go(explace[wh[f]][f], exy);
cout << excontain[wh[f]];
if (ch[f][wh[f]] != 2)++ch[f][wh[f]];
go(place[wh[f]][f][0], place[wh[f]][f][1]);
cout << sign;
Choosecolor(ch[f][wh[f]]);
cout << contain[wh[f]];
}
if (GetKeyState('J') < 0 && able[f][2]) {
able[f][2] = 0;
if (ch[f][wh[f]] != 2 && count[f] < 2){
++ch[f][wh[f]];
++count[f];
}
else if(ch[f][wh[f]]==2){
--ch[f][wh[f]];
--count[f];
}
go(place[wh[f]][f][0], place[wh[f]][f][1]);
Setcolor(f);
cout << sign;
Choosecolor(ch[f][wh[f]]);
cout << contain[wh[f]];
}
f = 1;
if (GetKeyState('I') < 0 && able[f][0]) {
if (ch[f][wh[f]] != 2)--ch[f][wh[f]];
able[f][0] = 0;
go(place[wh[f]][f][0], place[wh[f]][f][1]);
Setcolor(f);
cout << " ";
Choosecolor(ch[f][wh[f]]);
cout << contain[wh[f]];
Setcolor(f);
go(explace[wh[f]][f], exy);
for (unsigned int i = 0; i < excontain[wh[f]].size()/2+1; ++i)
cout << " ";
--wh[f];
if (wh[f] < 1)wh[f] = skills;
go(explace[wh[f]][f], exy);
cout << excontain[wh[f]];
if (ch[f][wh[f]] != 2)++ch[f][wh[f]];
go(place[wh[f]][f][0], place[wh[f]][f][1]);
cout << sign;
Choosecolor(ch[f][wh[f]]);
cout << contain[wh[f]];
}
if (GetKeyState('K') < 0 && able[f][1]) {
if (ch[f][wh[f]] != 2)--ch[f][wh[f]];
able[f][1] = 0;
go(place[wh[f]][f][0], place[wh[f]][f][1]);
Setcolor(f);
cout << " ";
Choosecolor(ch[f][wh[f]]);
cout << contain[wh[f]];
Setcolor(f);
go(explace[wh[f]][f], exy);
for (unsigned int i = 0; i < excontain[wh[f]].size()/2+1; ++i)
cout << " ";
++wh[f];
if (wh[f] > skills)wh[f] = 1;
go(explace[wh[f]][f], exy);
cout << excontain[wh[f]];
if (ch[f][wh[f]] != 2)++ch[f][wh[f]];
go(place[wh[f]][f][0], place[wh[f]][f][1]);
cout << sign;
Choosecolor(ch[f][wh[f]]);
cout << contain[wh[f]];
}
if (GetKeyState('L')<0 && able[f][2]) {
able[f][2] = 0;
if (ch[f][wh[f]] != 2 && count[f] < 2) {
++ch[f][wh[f]];
++count[f];
}
else if (ch[f][wh[f]] == 2) {
--ch[f][wh[f]];
--count[f];
}
go(place[wh[f]][f][0], place[wh[f]][f][1]);
Setcolor(f);
cout << sign;
Choosecolor(ch[f][wh[f]]);
cout << contain[wh[f]];
}
}
Backcolor(1);
int _s=0;
for (int i = 1; i <= skills; ++i) {
if (ch[0][i] == 2) {
if (i > skills - skilled)skill1[_s] = skills - i - 2;
else skill1[_s] = i;
++_s;
}
}
_s = 0;
for (int i = 1; i <= skills; ++i) {
if (ch[1][i] == 2) {
if (i > skills - skilled)skill2[_s] = skills - i - 2;
else skill2[_s] = i;
++_s;
}
}
Sleep(1000);
}
void Getmove() {
BoomGet();
if (GetKeyState('W') >= 0)dj1 = 0;
if (GetKeyState(VK_UP) >= 0)dj2 = 0;
if (GetKeyState('K') >= 0)s11 = 0;
if (GetKeyState('L') >= 0)s12 = 0;
if (GetKeyState('2') >= 0)s21 = 0;
if (GetKeyState('3') >= 0)s22 = 0;
if (skill1[0] == 2)s11 = 1;
if (skill1[1] == 2)s12 = 1;
if (skill2[0] == 2)s21 = 1;
if (skill2[1] == 2)s22 = 1;
if ((!p1.flying)&&(!p1.loving)) {
if (dj1 == 0 && GetKeyState('W') < 0 && (p1.jh <= jumph || ((skill1[0] == -1 || skill1[1] == -1) && p1.jh <= 2 * jumph))) {
dj1 = 1;
if ((skill1[0] == -1 || skill1[1] == -1) && p1.jh >= 2 * jumph && !p1.fly)p1.jh = 3 * jumph;
else if (p1.jh >= jumph && !p1.fly)p1.jh = 2 * jumph;
else p1.jh = p1.j + jumph;
p1.fly = 0;
p1.jump();
}
if (GetKeyState('A') < 0 && p1.x > 1) {
p1.move(1);
}
if (GetKeyState('D') < 0 && p1.x < 188) {
p1.move(2);
}
if (!p1.gaying) {
if (GetKeyState('J') < 0 && da1 == 0) {
da1 = 6;
p1.attack();
}
if (GetKeyState('K') < 0 && s11 == 0) {
s11 = 1;
p1.skill(skill1[0], 0);
}
if (GetKeyState('L') < 0 && s12 == 0) {
s12 = 1;
p1.skill(skill1[1], 1);
}
}
}
if ((!p2.flying)&&(!p2.loving)) {
if (!p2.gaying) {
if (GetKeyState('1') < 0 && da2 == 0) {
da2 = 6;
p2.attack();
}
if (GetKeyState('2') < 0 && s21 == 0) {
s21 = 1;
p2.skill(skill2[0], 0);
}
if (GetKeyState('3') < 0 && s22 == 0) {
s22 = 1;
p2.skill(skill2[1], 1);
}
}
if (dj2 == 0 && GetKeyState(VK_UP) < 0 && (p2.jh <= jumph || ((skill2[0] == -1 || skill2[1] == -1) && p2.jh <= 2 * jumph))) {
dj2 = 1;
if ((skill2[0] == -1 || skill2[1] == -1) && p2.jh >= 2 * jumph && !p2.fly)p2.jh = 3 * jumph;
else if (p2.jh >= jumph && !p2.fly)p2.jh = 2 * jumph;
else p2.jh = p2.j + jumph;
p2.fly = 0;
p2.jump();
}
if (GetKeyState(VK_LEFT) < 0 && p2.x > 1) {
p2.move(1);
}
if (GetKeyState(VK_RIGHT) < 0 && p2.x < 188) {
p2.move(2);
}
}
}
void BoomGet() {
if ((!p1.flying)&&(!p1.loving)&&(!p1.gaying)) {
if (skill1[0] == 2 && cool[0][0] <= 0) {
if (GetKeyState('K') < 0)++boom1;
if (boom1 > 30 || (GetKeyState('K') >= 0 && boom1)) {
p1.skill(2, 0);
boom1 = 0;
}
}
if (skill1[1] == 2 && cool[0][1] <= 0) {
if (GetKeyState('L') < 0)++boom1;
if (boom1 > 30 || (GetKeyState('L') >= 0 && boom1)) {
p1.skill(2, 1);
boom1 = 0;
}
}
}
if (p2.flying||p2.loving||p2.gaying)return;
if (skill2[0] == 2&&cool[1][0]<=0) {
if (GetKeyState('2') < 0)++boom2;
if (boom2 > 30 || (GetKeyState('2') >= 0 && boom2)) {
p2.skill(2,0);
boom2 = 0;
}
}
if (skill2[1] == 2&&cool[1][1]<=0) {
if (GetKeyState('3') < 0)++boom2;
if (boom2 > 30 || (GetKeyState('3') >= 0 && boom2)) {
p2.skill(2,1);
boom2 = 0;
}
}
}
void mapprint() {
for (int i = 1; i <= 188; ++i)
cout << " ";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), BACKGROUND_BLUE | BACKGROUND_INTENSITY);
for (int i = 1; i <= 80; ++i)
cout << " ";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_BLUE | FOREGROUND_INTENSITY | BACKGROUND_INTENSITY | BACKGROUND_GREEN | BACKGROUND_BLUE);
cout << " player1 ";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
cout << "?§";
Setcolor(1);
cout << " player2 ";
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), BACKGROUND_RED | BACKGROUND_INTENSITY);
for (int i = 1; i <= 80; ++i)
cout << " ";
go(1, 42);
SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), BACKGROUND_BLUE | BACKGROUND_GREEN | BACKGROUND_INTENSITY);
for (int i = 1; i <= 188; ++i)
cout << (char)22;
Backcolor(1);
go(20-name1.size()/2, 44);
cout << name1;
go(8, 46);
cout << "技能一: ";
_skillprint(0, 0);
go(8, 48);
cout << "技能二: ";
_skillprint(0, 1);
Setcolor(1);
go(160-name2.size()/2, 44);
cout << name2;
go(145, 46);
cout << "技能一: ";
_skillprint(1, 0);
go(145, 48);
cout << "技能二: ";
_skillprint(1, 1);
Backcolor(1);
}
void _skillprint(int a,int b) {
if (!a) {
if (!b) {
if (skill1[0] == 1)cout << "闪现 0.0 s";
else if (skill1[0] == 2)cout << "手雷 0.0 s";
else if (skill1[0] == 3)cout << "魅惑 0.0 s";
else if (skill1[0] == 4)cout << "捡肥皂 0.0 s";
else if (skill1[0] == -1)cout << "三段跳 -";
else if (skill1[0] == -2)cout << "弹射 -";
 }
else {
if (skill1[1] == 1)cout << "闪现 0.0 s";
else if (skill1[1] == 2)cout << "手雷 0.0 s";
else if (skill1[1] == 3)cout << "魅惑 0.0 s";
else if (skill1[1] == 4)cout << "捡肥皂 0.0 s";
else if (skill1[1] == -1)cout << "三段跳 -";
else if (skill1[1] == -2)cout << "弹射 -";
}
}
else {
if (!b) {
if (skill2[0] == 1)cout << "闪现 0.0 s";
else if (skill2[0] == 2)cout << "手雷 0.0 s";
else if (skill2[0] == 3)cout << "魅惑 0.0 s";
else if (skill2[0] == 4)cout << "捡肥皂 0.0 s";
else if (skill2[0] == -1)cout << "三段跳 -";
else if (skill2[0] == -2)cout << "弹射 -";
}
else {
if (skill2[1] == 1)cout << "闪现 0.0 s";
else if (skill2[1] == 2)cout << "手雷 0.0 s";
else if (skill2[1] == 3)cout << "魅惑 0.0 s";
else if (skill2[1] == 4)cout << "捡肥皂 0.0 s";
else if (skill2[1] == -1)cout << "三段跳 -";
else if (skill2[1] == -2)cout << "弹射 -";
}
}
}
void skillprint(int a, int b) {
if (!a) {
if (!b)go(27, 46);
else go(27, 48);
}
else {
if (!b)go(164, 46);
else go(164, 48);
}
Setcolor(a);
printf("%.1f", cool[a][b]);
if (cool[a][b] < 9.9)cout << " ";
Backcolor(a);
}
void winprint(bool f) {
Sleep(1000);
system("cls");
string winner;
if (!f)winner = name1;
else winner = name2;
go(91 - winner.size() / 2, 20);
Setcolor(f);
cout << winner << " Win !";
Sleep(3000);
}
int main() {
system("color B9");
movewindow();
system("mode con lines=60 cols=188");
start1();
HideCursor();
gamestart:
system("cls");
p1.a = 1;
p2.a = 2;
p1.b[0] = 17;
p1.b[1] = 16;
p2.b[0] = 17;
p2.b[1] = 16;
hit[0] = 14;
hit[1] = 36;
p1.x = 10;
p1.y = bottom-28;
p2.x = 160;
p2.y = bottom-28;
p1.j = 0;
p2.j = 0;
p1.life = 80;
p2.life = 80;
p1.fly = 1;
p2.fly = 1;
p1.flying = 0;
p2.flying = 0;
p1.gaying = 0;
p2.gaying = 0;
p1.myself = 0;
p2.myself = 1;
p1.dir = 1;
start2();
system("cls");
mapprint();
p1.print();
p2.print();
bool flag = 0;
float count=0;
int num = 0;
Sleep(500);
bool flying = 0;
while (p1.life > -1 && p2.life > -1) {
++count;
++num;
if (num >= 1000)num = 0;
if (da1)--da1;
if (da2)--da2;
if (p1.loving) {
--p1.loving;
if (num% 5 == 0) {
if (p1.x > p2.x)p1.move(1);
else p1.move(2);
}
if (!p1.loving)p1.print();
}
if (p2.loving){
--p2.loving;
if (num % 5 == 0) {
if (p2.x > p1.x)p2.move(1);
else p2.move(2);
}
if (!p2.loving)p2.print();
}
if (p1.gaying)--p1.gaying;
if (p2.gaying)--p2.gaying;
if (p1.fly&& p1.y < bottom) {
p1.clear();
++p1.y;
p1.print();
}
if (p2.fly&& p2.y < bottom) {
p2.clear();
++p2.y;
p2.print();
}
if (p1.y == bottom) {
p1.jh = 0;
p1.fly = 0;
p1.j = 0;
flying = 1;
}
if (p2.y == bottom) {
p2.jh = 0;
p2.fly = 0;
p2.j = 0;
}
if (p1.j) {
if (!p1.fly)p1.jump();
else --p1.j;
}
if (p2.j) {
if (!p2.fly)p2.jump();
else --p2.j;
}
if (p1.flying)p1.flown();
if (p2.flying)p2.flown();
if(flying)Getmove();
if (count >= 2.5) {
count -= 2.5;
for (register int i = 0; i <= 1; ++i)
for (register int j = 0; j <= 1; ++j) {
if (cool[i][j] > 0) {
cool[i][j] -= 0.1;
if (cool[i][j] < 0)cool[i][j] = 0;
skillprint(i, j);
}
}
}
if (!flag&&p1.x == p2.x)flag = 1;
if (flag && (p1.x != p2.x || p1.y != p2.y)) {
flag = 0;
p1.print();
p2.print();
}
int strb = bu.size();
for (int i = 0; i < strb; ++i) {
if (bu[i].soap) {
if (bu[i].fly()) {
bu.erase(bu.begin() + i);
--i;
--strb;
break;
}
}
else if (bu[i].boom || bu[i].love)
{
if (bu[i].fly() || bu[i].fly()) {
bu.erase(bu.begin() + i);
--i;
--strb;
break;
}
}
else if (bu[i].fly() || bu[i].fly()||bu[i].fly()) {
bu.erase(bu.begin() + i);
--i;
--strb;
break;
}
}
Sleep(40 - strb / 5);
}
winprint(p1.life < p2.life);
goto gamestart;
}

  

经典坦克大战
#include <stdio.h>
 #include <windows.h>
 #include <time.h> 
                            //里规格:长39*2=78 (真坐标)(假坐标宽为39)  高39
                            //外规格:长41*2=82 (真坐标)(假坐标宽为41)  高41
 #define UP    1
 #define DOWN  2
 #define LEFT  3
 #define RIGHT 4
 #define MAX_LEVEL 8
 #define BULLET_NUM 20
 #define MAX_LIFE 4
 //程序中未写入函数参数表中且未说明的变量只有map二维数组,level_info数组和level   
 /*
       此程序中涉及的x,y类的坐标值,分为以下两种:                                 
 假坐标:这里的坐标指的是以一个■长度为单位的坐标,而不是真正的coord坐标 (用于map数组的坐标)                             
 真坐标:头文件自带的坐标结构coord中的坐标(也可以说是控制台里的真正坐标值)                                 
   区别:纵坐标y两值一致,假横坐标x值与真正coord横坐标(真坐标)关系是 x * 2 = coord 横坐标    
           coord横坐标既指GoTo函数中的x参数,因为本程序游戏界面以一个■长度为基本单位,                    
           可以说涉及的coord横坐标全是偶数。既假坐标要变真坐标(变真坐标才能发挥真正作用),横坐标须乘以2                                    
 */
 typedef struct             //这里的出现次序指的是一个AI_tank变量中的次序,游戏共有四个AI_tank变量
 {                          //∵设定每个AI_tank每种特殊坦克只出现一次 ∴fast_tank & firm_tank 最多出现次数不超过1
     int fast_tank_order;   //fast_tank出现的次序(在第fast_tank_order次复活出现,从第0次开始),且每个AI_tank只出现一次
     int firm_tank_order;   //firm_tank出现的次序,同上
 } LevInfo;                 //关卡信息(准确说是该关出现的坦克信息)
 LevInfo level_info [MAX_LEVEL] = {{-1,-1},{3,-1},{-1,3},{2,3},{2,3},{2,3},{2,3},{2,3}};   //初始化,-1代表没有该类型坦克
 typedef struct      //子弹结构体
 {
     int x,y;        //子弹坐标,假坐标
     int direction;  //子弹方向变量
     bool exist;     //子弹存在与否的变量,1为存在,0不存在
     bool initial;   //子弹是否处于建立初状态的值,1为处于建立初状态,0为处于非建立初状态
     bool my;        //区分AI子弹与玩家子弹的标记,0为AI子弹,1为玩家(我的)子弹
 } Bullet;
 Bullet bullet [BULLET_NUM];  //考虑到地图上不太可能同时存在20颗子弹,所以数组元素设置20个
 typedef struct      //坦克结构体
 {
     int x,y;        //坦克中心坐标
     int direction;  //坦克方向
     int color;      //颜色参方向数,1到6分别代表不同颜色,具体在PrintTank函数定义有说明
     int model;      //坦克图案模型,值为1,2,3,分别代表不同的坦克图案,0为我的坦克图案,AI不能使用
     int stop;       //只能是AI坦克使用的参数,非0代表坦克停止走动,0为可以走动
     int revive;     //坦克复活次数
     int num;        //AI坦克编号(固定值,为常量,初始化函数中定下)0~3
     int CD;         //发射子弹冷却计时
     bool my;        //是否敌方坦克参数,我的坦克此参数为1,为常量
     bool alive;     //存活为1,不存活为0
 }  Tank;
 Tank AI_tank[4] , my_tank;  //my_tank为我的坦克,Ai_tank 代表AI坦克
 //∵所有的函数都有可能对全局变量map进行读写(改变),
 //∴函数中不另说明是否会对全局变量map读写
 //基本操作与游戏辅助函数
 void GoToxy(int x,int y);    //光标移动
 void HideCursor();           //隐藏光标
 void keyboard ();            //接受键盘输入
 void Initialize();           //初始化(含有对多个数据的读写)
 void Stop();                 //暂停
 void Getmap();               //地图数据存放与获取
 void Frame ();               //打印游戏主体框架
 void PrintMap();             //打印地图(地图既地图障碍物)(含对level的读取)
 void SideScreen ();          //副屏幕打印
 void GameCheak();            //检测游戏输赢
 void GameOver( bool home );  //游戏结束
 void ClearMainScreen();      //主屏幕清屏函数∵system("cls")后打印框架有一定几率造成框架上移一行的错误∴单独编写清屏函数
 void ColorChoose(int color); //颜色选择函数
 void NextLevel();            //下一关(含有对level全局变量的读写)
 //子弹部分
 void BuildAIBullet(Tank *tank);                //AI坦克发射子弹(含有对my_tank的读取,只读取了my_tank坐标)
 void BuildBullet  (Tank tank);                 //子弹发射(建立)(人机共用)(含全局变量bullet的修改)我的坦克发射子弹直接调用该函数,AI通过AIshoot间接调用
 void BulletFly    (Bullet bullet[BULLET_NUM]); //子弹移动和打击(人机共用),
 void BulletHit    (Bullet* bullet);            //子弹碰撞(人机共用)(含Tank全局变量的修改),只通过BulletFly调用,子弹间的碰撞不在本函数,子弹间碰撞已在BulletShoot中检测并处理
 void PrintBullet  (int x,int y,int T);         //打印子弹(人机共用)
 void ClearBullet  (int x,int y,int T);         //清除子弹(人机共用)
 int  BulletCheak  (int x,int y);               //判断子弹前方情况(人机共用)
 //坦克部分
 void BuildAITank (int* position, Tank* AI_tank); //建立AI坦克
 void BuildMyTank (Tank* my_tank);                //建立我的坦克
 void MoveAITank  (Tank* AI_tank);                //AI坦克移动
 void MoveMyTank  (int turn);                     //我的坦克移动,只通过keyboard函数调用,既键盘控制
 void ClearTank   (int x,int y);                  //清除坦克(人机共用)
 void PrintTank   (Tank tank);                    //打印坦克(人机共用)
 bool TankCheak   (Tank tank,int direction);      //检测坦克dirtection方向的障碍物,返值1阻碍,0 畅通
 int  AIPositionCheak (int position);           //检测AI坦克建立位置是否有障碍物AIPositionCheak
 //DWORD WINAPI InputX(LPVOID lpParameter); //声明线程函数,用于检查X键输入并设置X键的输入冷却时间
 //注意map数组应是纵坐标在前,横坐标在后,既map[y][x],(∵数组行长度在前,列长度在后)
 //map里的值: 个位数的值为地图方块部分,百位数的值为坦克,子弹在map上没有值(子弹仅仅是一个假坐标)
 //map里的值: 0为可通过陆地,1为红砖,2黄砖,5为水,100~103为敌方坦克,200为我的坦克,
 //全局变量
 int map[41][41];  //地图二维数组
 int key_x;        // X键是否被"读入"的变量,也是子弹是否可以发射的变,
 int bul_num;      //子弹编号
 int position;     //位置计数,对应AI坦克生成位置,-1为左位置,0为中间,1为右,2为我的坦克位置
 int speed=7;      //游戏速度,调整用
 int level=1;      //游戏关卡数
 int score=0;      //游戏分数
 int remain_enemy; //剩余敌人(未出现的敌人)
 char* tank_figure[4][3][4]=
 {
   {
     {"◢┃◣", "◢━◣", "◢┳◣", "◢┳◣"},
     {"┣●┫", "┣●┫", "━●┃", "┃●━"},
     {"◥━◤", "◥┃◤", "◥┻◤", "◥┻◤"}
   }, 
   {
     {"┏┃┓", "┏┳┓", "┏┳┓", "┏┳┓"},
     {"┣●┫", "┣●┫", "━●┫", "┣●━"},
     {"┗┻┛", "┗┃┛", "┗┻┛", "┗┻┛"}
   }, 
   {
     {"┏┃┓", "◢━◣", "┏┳◣", "◢┳┓"},
     {"┣●┫", "┣●┫", "━●┃", "┃●━"},
     {"◥━◤", "┗┃┛", "┗┻◤", "◥┻┛"}
   },
   {
     {"╔┃╗", "╔╦╗", "╔╦╗", "╔╦╗"},
     {"╠█╣", "╠█╣", "━█╣", "╠█━"},
     {"╚╩╝", "╚┃╝", "╚╩╝", "╚╩╝"}
   }
 };
 int main ()                               //主函数
 {
     int i;
     unsigned int interval[12]={1,1,1,1,1,1,1,1,1,1,1,1} ;  //间隔计数器数组,用于控制速度
     srand(time(NULL)); //设置随机数种子(若不设置种子而调用rand会使每次运行的随机数序列一致)随机数序列指:如首次调用rand得到1,第二次得2,第三次3,则此次随机数序列为1,2,3
     HideCursor();                         //隐藏光标
     system("mode con cols=112 lines=42"); //控制窗口大小
     Frame ();                             //打印游戏主体框架
     Initialize();                         //初始化,全局变量level初值便是1 
 //    HANDLE h1 , h2 ;                      //定义句柄变量
     for(;;)
     {
         if(interval[0]++%speed==0)        //速度调整用,假设interval[0]为a, 语句意为 a % 2==0,a=a+1; 
         {
             GameCheak();                  //游戏胜负检测
             BulletFly ( bullet );
             for(i=0 ; i<=3 ; i++)         //AI坦克移动循环
             {
                 if(AI_tank[i].model==2 && interval[i+1]++%2==0) //四个坦克中的快速坦克单独使用计数器1,2,3,4
                     MoveAITank( & AI_tank[i]);
                 if(AI_tank[i].model!=2 && interval[i+5]++%3==0) //四个坦克中的慢速坦克单独使用计数器5,6,7,8
                     MoveAITank( & AI_tank[i]);
             }
             for(i=0;i<=3;i++)                                   //建立AI坦克部分
                      if(AI_tank[i].alive==0 && AI_tank[i].revive<4 && interval[9]++%90==0)  //一个敌方坦克每局只有4条命
                 {                                               //如果坦克不存活。计时,每次建立有间隔  1750 ms
                        BuildAITank( &position, & AI_tank[i] );     //建立AI坦克(复活)
                       break;                                      //每次循环只建立一个坦克
                   }
             for(i=0;i<=3;i++)
                 if(AI_tank[i].alive)
                     BuildAIBullet(&AI_tank[i]);                 //AIshoot自带int自增计数CD,不使用main中的CD interval
             if(my_tank.alive && interval[10]++%2==0 )
                  keyboard ();
             if(my_tank.alive==0 && interval[11]++%30==0 && my_tank.revive < MAX_LIFE)
                  BuildMyTank( &my_tank );
         }
         Sleep(5);
     }
     return 0;
 }
 /*//这里的多线程暂时不用                   //x键用于子弹发射,x键的冷却时间不能和上下左右一同设置,那样就太快了
 DWORD WINAPI InputX(LPVOID lpParameter)    //如果不用多线程运行,那么在x键冷却时间内程序会因Sleep将会挂起,暂停运行
 {                                          //因为只有一个变量改变,而且变量改变先后顺序是显而易见的,所以不必设置缓冲区
     for(;;)                              
     {                                    
         if(GetAsyncKeyState( 88 )& 0x8000) //88为x键键值,当摁下x并且x键处于可输入状态
         {
             key_x=1;                       // X键是否允许被"读入"的变量,也是子弹是否可以发射的变量
             Sleep(600);                    // 子线程Sleep中,x就不能被"读入",主线程每操作完一次子弹发射,key_x会归零
         }
         Sleep(10);
     }
     return 0;
 }*/
 void keyboard ()
 {               // kbhit()   getch()  用法可用但是不好用            
 /* 
    函数功能:该函数判断在此函数被调用时,某个键是处于UP状态还是处于DOWN状态,及前次调用GetAsyncKeyState函数后,
    是否按过此键.如果返回值的最高位被置位,那么该键处于DOWN状态;如果最低位被置位,那么在前一次调用此函数后,此键被按过,
    否则表示该键没被按过.
    这里GetAsyncKeyState比 kbhit() + getch() 好用,操作更顺畅.   GetAsyncKeyState的返回值表示两个内容,
    一个是最高位bit的值,代表这个键是否被按下。一个是最低位bit的值,代表上次调用GetAsyncKeyState后,这个键是否被按下。
    &为与操作,&0x8000就是判断这个返回值的高位字节。如果high-order bit是1,则是按下状态,否则是弹起状态,为0
 */
     int count=0;
     if (GetAsyncKeyState(VK_UP)& 0x8000)  
         MoveMyTank( UP );
     else if (GetAsyncKeyState(VK_DOWN)& 0x8000)  
         MoveMyTank( DOWN );
     else if (GetAsyncKeyState(VK_LEFT)& 0x8000)
         MoveMyTank( LEFT );
     else if (GetAsyncKeyState(VK_RIGHT)& 0x8000)  
         MoveMyTank( RIGHT );
     else if (GetAsyncKeyState( 0x1B )& 0x8000)  // Esc键
         exit(0);                                //退出程序函数
     else if (GetAsyncKeyState( 0x20 )& 0x8000)  //空格
         Stop();
     else if (count++%7==0)            //这里添加计数器是为了防止按键粘连不能达到微调效果
     {
         if (speed>1 && GetAsyncKeyState( 0x6B )& 0x8000)   // +键
         {
             speed--;
             GoToxy(102,11);           //在副屏幕打印出当前速度
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED);
             printf("%d ",21-speed);   //副屏幕显示的速度为1~10
         }
         else if (speed<20 && GetAsyncKeyState( 0x6D )& 0x8000)  // - 键
         {
             speed++;
             GoToxy(102,11);           //在副屏幕打印出当前速度
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED);
             printf("%d ",21-speed);   //副屏幕显示的速度为1~10
         }
     }
     if(my_tank.CD==7)
     {
         if(GetAsyncKeyState( 88 )& 0x8000)
         {
             BuildBullet(my_tank);
             my_tank.CD=0;
         }
     }
     else
         my_tank.CD++;
 }
 void BuildAIBullet(Tank *tank)   //AI子弹发射(建立)含有对my_tank的读取
 {
     if(tank->CD==15)
     {
         if(!(rand()%11))     //冷却结束后在随后的每个游戏周期中有10分之一的可能发射子弹
         {
             BuildBullet(*tank);
             tank->CD=0;
         }
     }
     else
         tank->CD++;
     if(tank->CD >= 14)       //AI强化部分,在冷却到达一定范围即可使用
     {
         if(tank->y==38 )     //如果坦克在底部(这个最优先)
         {
             if(tank->x < 20) //在老家左边
             {
                 if(tank->direction==RIGHT)  //坦克方向朝左
                 {
                     BuildBullet(*tank);     //发射子弹
                     tank->CD=0;
                 }
             }
             else             //在老家右边
                 if(tank->direction==LEFT)   //坦克方向朝右
                 {
                     BuildBullet(*tank);     //发射子弹
                     tank->CD=0;
                 }
         }
         else if(tank->x==my_tank.x+1 || tank->x==my_tank.x || tank->x==my_tank.x-1)  //AI坦克在纵向上"炮口"对准我的坦克
         {
             if(tank->direction==DOWN && my_tank.y > tank->y || tank->direction==UP && my_tank.y < tank->y)
             {                               //若是AI朝下并且我的坦克在AI坦克下方(数值大的在下面)或者AI朝上我的坦克在AI上方
                 int big=my_tank.y , smal=tank->y , i; 
                 if(my_tank.y < tank->y)
                 {
                     big=tank->y;
                     smal=my_tank.y;
                 }
                 for(i=smal+2;i<=big-2;i++)  //判断AI炮口的直线上两坦克间有无障碍
                     if(map[i][tank->x]!=0 || map[i][tank->x]!=5)      //若有障碍
                         break;
                 if(i==big-1)                //若i走到big-1说明无障碍
                 {
                     BuildBullet(*tank);     //则发射子弹
                     tank->CD=0;
                 }
             }
         }
         else if(tank->y==my_tank.y+1 || tank->y==my_tank.y || tank->y==my_tank.y-1) //AI坦克在横向上"炮口"对准我的坦克
         {
             if(tank->direction==RIGHT && my_tank.x > tank->x || tank->direction==LEFT && my_tank.x < tank->x)
             {                  //若是AI朝右并且我的坦克在AI坦克右方(数值大的在下面)或者AI朝左我的坦克在AI左方
                 int big=my_tank.y , smal=tank->y , i;
                 if(my_tank.x < tank->x)
                 {
                     big=tank->x;
                     smal=my_tank.x;
                 }
                 for(i=smal+2;i<=big-2;i++)  //判断AI炮口的直线上两坦克间有无障碍
                     if(map[tank->y][i]!=0 || map[tank->y][i]!=5)      //若有障碍
                         break;
                 if(i==big-1)   //若i走到big-1说明无障碍
                 {
                     BuildBullet(*tank);     //则发射子弹
                     tank->CD=0;
                 }
             }
         }
     }
 }
 void BuildBullet(Tank tank)  //子弹发射(建立),传入结构体Tank,这里包含改变了全局变量结构体bullet
 {                            //∵实现方式为顺序循环建立子弹,每次调用改变的bullet数组元素都不同
     switch(tank.direction)   //∴为了方便,不将bullet放入参数,bullet作为全局变量使用
     {
         case UP    :
                 bullet [bul_num].x = tank.x;
                 bullet [bul_num].y = tank.y-2;
                 bullet [bul_num].direction=1;
                 break;
         case DOWN  :
                 bullet [bul_num].x = tank.x;
                 bullet [bul_num].y = tank.y+2;
                 bullet [bul_num].direction=2;
                 break;
         case LEFT  :
                 bullet [bul_num].x = tank.x-2;
                 bullet [bul_num].y = tank.y;
                 bullet [bul_num].direction=3;
                 break;
         case RIGHT :
                 bullet [bul_num].x = tank.x+2;                                     
                 bullet [bul_num].y = tank.y; 
                 bullet [bul_num].direction=4;
                 break; 
     }     
     bullet [bul_num].exist = 1;    //子弹被建立,此值为1则此子弹存在
     bullet [bul_num].initial = 1;  //子弹处于初建立状态
     bullet [bul_num].my=tank.my;   //如果是我的坦克发射的子弹bullet.my=1,否则为0
     bul_num++;
     if(bul_num==BULLET_NUM)        //如果子弹编号增长到20号,那么重头开始编号
         bul_num=0;                 //考虑到地图上不可能同时存在20颗子弹,所以数组元素设置20个
 }
 void BulletFly(Bullet bullet[BULLET_NUM]) //子弹移动和打击
 {                                         //含有全局变量Bullet的改变
     for(int i =0; i<BULLET_NUM;i++)
     {
         if(bullet [i].exist)              //如果子弹存在
         {   
             if(bullet [i].initial==0)     //如果子弹不是初建立的
             {                           
                 if(map[bullet[i].y] [bullet[i].x]==0 || map[bullet[i].y] [bullet[i].x]==5)   //如果子弹坐标当前位置无障碍
                     ClearBullet( bullet[i].x , bullet[i].y , BulletCheak(bullet[i].x , bullet[i].y ));     //抹除子弹图形
                 switch(bullet [i].direction)                                      //然后子弹坐标变化(子弹变到下一个坐标)
                 {
                     case UP    :(bullet [i].y)--;break;
                     case DOWN  :(bullet [i].y)++;break;
                     case LEFT  :(bullet [i].x)--;break;
                     case RIGHT :(bullet [i].x)++;break;
                 }
             }
             int collide = BulletCheak ( bullet [i].x , bullet [i].y );   //判断子弹当前位置情况,判断子弹是否碰撞,是否位于水面上。
             if( collide )                                                //如果检测到当前子弹坐标无障碍(无碰撞)(包括在地面上与在水面上)
                 PrintBullet( bullet[i].x , bullet[i].y , collide);       //则打印子弹,若有碰撞则不打印
             else
                 BulletHit( & bullet [i] );     //若有碰撞则执行子弹碰撞函数                  
             if(bullet [i].initial)             //若子弹初建立,则把初建立标记去除
                 bullet [i].initial = 0;
             for(int j=0; j< BULLET_NUM ; j++)  //子弹间的碰撞判断,若是我方子弹和敌方子弹碰撞则都删除,若为两敌方子弹则无视
                 if(bullet [j].exist && j!=i && (bullet[i].my || bullet[j].my) && bullet[i].x==bullet[j].x && bullet[i].y==bullet[j].y)
                 {                              //同样的两颗我方子弹不可能产生碰撞
                     bullet [j].exist=0;
                     bullet [i].exist=0;
                     ClearBullet( bullet[j].x , bullet[j].y , BulletCheak(bullet[j].x , bullet[j].y ));  //抹除j子弹图形,子弹i图形已被抹除
                     break;
                 }
         }
     }
 }
 void BulletHit(Bullet* bullet)  //含有Tank全局变量的修改,子弹间的碰撞不在本函数,子弹间碰撞已在BulletShoot中检测并处理
 {                               //∵每次打中的坦克都不一样,不可能把所有坦克放在参数表中
     int x=bullet->x;            //∴这里的Tank使用全局变量
     int y=bullet->y;            //这里传入的值是子弹坐标,这两个值不需要改变
     int i;
     if(map[y][x]==1 || map[y][x]==2)  //子弹碰到砖块
     {
         if(bullet->direction==UP || bullet->direction==DOWN)   //如果子弹是纵向的
             for(i = -1 ; i<=1 ; i++)
                 if(map[y][x+i]==1 || map[y][x+i]==2)  //如果子弹打中砖块两旁为砖块,则删除砖,若不是(一旁为坦克或其他地形)则忽略
                 {
                     map[y][x+i]=0;    //砖块碎
                      GoToxy(2*x+2*i,y);
                     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED); //背景黑色
                      printf("  ");
                 }
         if(bullet->direction==LEFT || bullet->direction==RIGHT)     //若子弹是横向的  (与子弹纵向实现同理)
             for(i = -1 ; i<=1 ; i++)
                 if(map[y+i][x]==1 || map[y+i][x]==2)
                 {
                     map[y+i][x]=0;
                      GoToxy(2*x,y+i);
                     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED); //背景黑色
                      printf("  "); 
                 }
         bullet->exist=0;           //这颗子弹已经不存在了
     }
     else if(map[y][x]==4 || map[y][x]==6 )  //子弹碰到边框或者不可摧毁方块
         bullet->exist=0;
     else if(bullet->my && map[y][x]>=100 && map[y][x]<104 )  //若我的子弹碰到了敌方坦克
     {
         int num = map[y][x]%100;   //map[y][x]%100 等同于 tank.num ,可通过map值读取该坦克信息
         if(AI_tank[num].model==3 && AI_tank[num].color==2)   //若为firm tank,且color==2。该坦克为绿色,表明没有受到伤害
                 AI_tank[num].color=3;                        //则变成黄色,color=3为黄色
         else if (AI_tank[num].model==3 && AI_tank[num].color==3)
                 AI_tank[num].color=4;                        //4为红色
         else                       //其他类型的坦克或者firm tank为红色的情况
         {
             AI_tank[num].alive=0;
             ClearTank(AI_tank[num].x , AI_tank[num].y);      //清除该坦克
         }
         bullet->exist=0;
         score+=100;
         GoToxy(102,5);             //在副屏幕上打印出分数
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
         printf("%d ",score);
     }
     else if(map[y][x]==200 && bullet->my==0 )   //若敌方子弹击中我的坦克
     {
         my_tank.alive=0;
         ClearTank(my_tank.x , my_tank.y);
         bullet->exist=0;
         my_tank.revive++;      //我的坦克复活次数+1(∵我的坦克复活次数与生命值有关∴放在这里自减)
         score-=100;            //分数减少
         GoToxy(102,5);         //在副屏幕上打印出分数
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE);
         printf("%d   ",score);
         GoToxy(102,7);         //在副屏幕打印出我的剩余生命值
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
         printf("%d   ", MAX_LIFE-my_tank.revive);
     }
 //    else if(bullet->my==0 && map[y][x]>=100 && map[y][x]<104) //敌方子弹击中敌方坦克,可以设置两种子弹运行方式,这种暂时不用
 //        bullet->exist=0;
     else if(map[y][x]==9)      //子弹碰到家(无论是谁的子弹)
     {
         bullet->exist=0;
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
         GoToxy(38,37);     printf("      ");
         GoToxy(38,38);     printf("◢◣  ");
         GoToxy(38,39);     printf("███");
         GameOver(1);           //游戏结束,传入1代表老家被毁
     }
 }
 int BulletCheak (int x,int y)  //判断子弹当前位置情况,判断子弹是否碰撞,是否位于水面上。
 {                              //有障碍返回0,无障碍且子弹在地面返回1,子弹在水面上返回2
     if(map[y][x]==0)
         return 1;
     else if(map[y][x]==5)
         return 2;
     else
         return 0;
 }
 void PrintBullet (int x,int y,int T)   //当前坐标BulletCheak 的值做参量 T
 {
     if(T==1)          //  T==1 表示子弹当前坐标在陆地上
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY);
     else if(T==2)     //  T==2 表示子弹当前坐标在水面上
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED|FOREGROUND_GREEN|FOREGROUND_BLUE|FOREGROUND_INTENSITY|BACKGROUND_BLUE);
     GoToxy(2*x,y);
     printf("");
 }
 void ClearBullet(int x,int y,int T)   //当前坐标BulletCheak 的值做参量 T
 {
     GoToxy(2*x,y);
     if(T==2)        //  T==2 表示子弹当前坐标在水面上
     {
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|BACKGROUND_BLUE|FOREGROUND_BLUE|FOREGROUND_GREEN);
         printf("~");
     }
     else if(T==1)   //  T==1 表示子弹当前坐标在陆地上
     {
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE);
         printf("  ");
     }
 }
 //position为坦克生成位置,-1为左位置,0为中间,1为右,2为我的坦克位置
 void BuildAITank(int* position, Tank* AI_tank)   //执行一次该函数只建立一个坦克
 {                                         //rand函数公式:0<=rand()%(a+1)<=a  0+m<=rand()%(n-m+1)+m<=n  
                                           //rand函数实现1到n:1<=rand()%(n)+1<=n
        if(AIPositionCheak(*position))        //若此位置无障碍,可生成。position参数详见AIPositionCheak函数定义
     {
         AI_tank->x= 20 + 18*(*position);  //20 + 18 * position 对应三个生成位置的x假坐标
         AI_tank->y=2;
         if(AI_tank->revive==level_info[level-1].firm_tank_order)  //坦克出现(复活)次序==关卡信息(level_info)中firm tank的出现次序
         {
             AI_tank->model = 3;           //3为firm tank的模型(外观)
             AI_tank->color = 2;           //颜色参数2为绿色,具体详见函数ColorChoose
         }
         else if(AI_tank->revive==level_info[level-1].fast_tank_order)  //同上if,这里是fast_tank的
         {
             AI_tank->model = 2;
             AI_tank->color = rand()%6+1;  //若不是firm tank则随机颜色,颜色参数为1~6,分别代表不同颜色,详见函数ColorChoose
         }
         else      //普通坦克
         {
             AI_tank->model = 1;
                AI_tank->color = rand()%6+1;  //若不是firm tank则随机颜色
         }
         AI_tank->alive = 1;       //坦克变为存在
         AI_tank->direction = 2 ;  //方向朝下
         AI_tank->revive++;        //复活次数+1
         PrintTank(*AI_tank);
         (*position)++; 
         remain_enemy--;
         GoToxy(102,9);            //在副屏幕上打印剩余坦克数
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
         printf("%d ",remain_enemy);
         if(*position==2)          //position只能为0,1,-1,这里position循环重置
             *position = -1;
              return ;                  //若生成了一辆坦克,则结束该函数
     }
 }
 int AIPositionCheak( int position )    //position为坦克生成位置2为我的坦克位置,其余为AI位,-1为左位,0为中间位置,1为右位
 {
     int    x,y;
     if(position==2)                    //2为我的坦克位置,现在暂时用不到
         x=15,y=38;
     else
         y=2 , x= 20 + 18 * position ;  //20 + 18 * position 对应三个生成位置的x假坐标
     for(int i=0;i<3;i++)
         for(int j=0;j<3;j++)
             if( map[y+j-1][x+i-1]!=0)  //如果遍历的九宫格里有障碍物
                 return 0;              //则返回0,表示此生成位置有阻碍
     return 1;                          //否则生成1,表示此生成位置无阻碍
 }
 void MoveAITank(Tank* AI_tank) //AI专用函数,该函数主要为AI加强
 {
        if(AI_tank->alive)         //如果坦克活着
     {
         if(AI_tank->stop!=0)   //坦克是否停止运动的判断,若stop参数不为0
         {
             AI_tank->stop--;   //则此坦克本回合停止运动
             return;
         }
         if( !(rand()%23) )     //22分之1的概率执行方向重置
         {
             AI_tank->direction = rand()%4+1;
             if( rand()%3 )     //在方向重置后有2分之1的概率停止走动3步的时间
             {
                 AI_tank->stop=2;
                 return;
             }
         }
         ClearTank (AI_tank->x , AI_tank->y);
         if(TankCheak ( *AI_tank , AI_tank->direction))   //如果前方无障碍
             switch ( AI_tank->direction )
             {
                    case UP   : AI_tank->y--; break;  //上前进一格
                 case DOWN : AI_tank->y++; break;  //下前进一格
                  case LEFT : AI_tank->x--; break;  //左前进一格
                 case RIGHT: AI_tank->x++; break;  //右前进一格
             }
         else                     //前方有障碍
         {
             if(!(rand()%4))      //3分之1的概率乱转
             {
                 AI_tank->direction=rand()%4+1;
                 AI_tank->stop=2; //乱转之后停止走动3步的时间
                 PrintTank(*AI_tank);
                 return;          //∵continue会跳过下面的打印函数,∴这里先打印
             }
             else                 //另外3分之2的几率选择正确的方向
             {
                 int j;
                 for(j=1;j<=4;j++)
                     if(TankCheak ( *AI_tank , j ))  //循环判断坦克四周有无障碍,此函数返值1为可通过
                         break;
                 if(j==5)         //j==5说明此坦克四周都有障碍物,无法通行
                 {
                     PrintTank(*AI_tank);
                     return;      //则跳过下面的while循环以防程序卡死
                 }
                 while(TankCheak ( *AI_tank , AI_tank->direction) == 0)  //如果前方仍有障碍
                     AI_tank->direction=(rand()%4+1);                    //则换个随机方向检测
             }
         }
         PrintTank(*AI_tank);     //打印AI坦克
     }
 }
 void BuildMyTank (Tank* my_tank) //建立我的坦克
 {
     my_tank->x=15;
        my_tank->y=38;
        my_tank->stop=NULL;
        my_tank->direction=1;
     my_tank->model=0;
     my_tank->color=1;
     my_tank->alive=1;
     my_tank->my=1;
     my_tank->CD=7;
     PrintTank (*my_tank) ;   //打印我的坦克
 }
 void MoveMyTank(int turn )   //玩家专用函数,turn为keyboard函数里因输入不同方向键而传入的不同的值
 {
     ClearTank(my_tank.x , my_tank.y);        //map 数组中"我的坦克"参数清除工作已在此函数中完成
     my_tank.direction=turn;                  //将键盘输入的方向值传入我的坦克方向值
     if(TankCheak ( my_tank , my_tank.direction ))  //若此时我的坦克当前方向上无障碍
         switch (turn)
         {
             case UP   : my_tank.y--; break;  //上前进一格
             case DOWN : my_tank.y++; break;  //下前进一格
             case LEFT : my_tank.x--; break;  //左前进一格
             case RIGHT: my_tank.x++; break;  //右前进一格
     }                                        //若坦克当前方向上有障碍则跳过坐标变化直接打印该转向的坦克
     PrintTank (my_tank);
 }
 bool TankCheak(Tank tank,int direction)  //检测坦克前方障碍函数,参量为假坐标。返值1为可通过,返值0为阻挡(人机共用)
 {
     switch(direction)                    //direction变量   1上,2下,3左,4右
     {
         case UP:
             if (map[tank.y-2][tank.x]==0 && map[tank.y-2][tank.x-1]==0 && map[tank.y-2][tank.x+1]==0)
                 return 1;
             else
                 return 0;
         case DOWN:
             if (map[tank.y+2][tank.x]==0 && map[tank.y+2][tank.x-1]==0 && map[tank.y+2][tank.x+1]==0)
                 return 1;
             else
                 return 0;
         case LEFT:
             if (map[tank.y][tank.x-2]==0 && map[tank.y-1][tank.x-2]==0 && map[tank.y+1][tank.x-2]==0)
                 return 1;
             else
                 return 0;
         case RIGHT:
             if (map[tank.y][tank.x+2]==0 && map[tank.y-1][tank.x+2]==0 && map[tank.y+1][tank.x+2]==0)
                 return 1;
             else
                 return 0;
         default:
             printf("错误!!");
             Sleep(5000);
             return 0;
     }
 }
 void ClearTank(int x,int y)   //清除坦克函数(人机共用)
 {
     for(int i=0;i<3;i++)
         for(int j=0;j<3;j++)
         {                     //将坦克占用的地图上的九格去掉
              map[y+j-1][x+i-1]=0;
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN);
             GoToxy(2*x+2*j-2,y+i-1);
             printf("  ");
         }
 }
 void PrintTank(Tank tank)     //打印坦克(人机共用) 由于读取的Tank参数较多,故就不将参数一一传入了
 {                             // tank.color参数对应不同的颜色,范围 1 ~ 6
     ColorChoose(tank.color);  //颜色选择函数   定义一个数组里装着字符指针(既装字符串)的数组指针(指向一维数组首地址的指针)
     char *(*tankF)[4] = tank_figure[tank.model];  //将二维数组首址赋初值给数组指针 model==0为我的坦克,4为电脑1坦克,8为电脑2,类推
     for(int i = 0; i < 3; i++)   
     {
         GoToxy((tank.x-1)*2 , tank.y-1+i);        //在坦克中心坐标的左边,上中下三行打印
         printf("%s", tankF[i][tank.direction-1]); //打印的是地址,地址既字符串
          for(int j=0;j<3;j++)
             if(tank.my)       //若为我的坦克
                 map[tank.y+j-1][tank.x+i-1]=200;  //在map上把"坦克"九格填满代表敌我坦克的参数。敌方此值为100~103,我方为200
             else
                 map[tank.y+j-1][tank.x+i-1]=100+tank.num;  //这样可以通过map值读取坦克编号,读取操作在BulletHit 函数
     }
 }
 void HideCursor()  //隐藏光标
 {                  //CONSOLE_CURSOR_INFO结构体包含控制台光标的信息,DWORD dwSize光标百分比厚度(1~100)和BOOL bVisible光标是否可见
     CONSOLE_CURSOR_INFO cursor_info={1,0};
     SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE),&cursor_info); //SetConsoleCursorInfo用来设置指定的控制台光标的大小和可见性。
 }
 void GoToxy(int x,int y)  //光标移动函数,X表示横坐标,Y表示纵坐标。
 {
     COORD  coord;         //使用头文件自带的坐标结构
     coord.X=x;            //这里将int类型值传给short,不过程序中涉及的坐标值均不会超过short范围
     coord.Y=y;
     HANDLE a=GetStdHandle(STD_OUTPUT_HANDLE);  //获得标准输出句柄
     SetConsoleCursorPosition(a,coord);         //以标准输出的句柄为参数设置控制台光标坐标
 }
 void ColorChoose(int color)   //颜色选择函数
 {
     switch(color)
     {
            case 1:               //天蓝色(我的坦克颜色)
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
             break;
         case 2:               //绿色
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);    
             break;
         case 3:               //黄色
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
             break;
         case 4:               //红色
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
             break;
         case 5:               //紫色
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
             break;
         case 6:               //白色
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE|FOREGROUND_GREEN);
             break;
         case 7:               //深蓝色(∵颜色深难与黑色背景辨识度不高 ∴坦克颜色不选用此颜色),只用在字体颜色闪烁中
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
             break;
     }
 }
 void Stop()    //暂停
 {
     int color=1,timing=0;
     while(1)
     {
         if(timing++%30==0)
         {
             ColorChoose(color);   //颜色选择
             GoToxy(100,13);       //副屏幕打印
             printf("游戏暂停");
             GoToxy(88,17);
             printf("按回车键回到游戏");
             GoToxy(88,18);
             printf("或按 Esc键退出游戏");
             if(++color==8)
                 color=1;
         }
         if (GetAsyncKeyState( 0xD )& 0x8000)      //回车键
         {
             GoToxy(100,13);       //副屏幕打印
             SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
             printf("正在进行");   //覆盖掉原来的提示
             GoToxy(88,17);
             printf("                     ");
             GoToxy(88,18);
             printf("                     ");
             break;
         }
         else if(GetAsyncKeyState( 0x1B )& 0x8000) //Esc键退出    
             exit(0);
         Sleep(20);
     }
 }
 void ClearMainScreen()  //主屏幕清屏函数,因使用system("cls");再打印框架有一定几率造成框架上移一行的错误,所以单独编写清屏函数
 {
     for(int i=1;i<40;i++)
     {
         GoToxy(2,i);
         printf("                                                                              ");
     }
 }
 void Frame ()     //打印游戏主体框架
 {                 //SetConsoleTextAttribute为设置文本颜色和文本背景颜色函数
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_INTENSITY);
     printf("  ▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁  ");
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY|FOREGROUND_BLUE); 
     printf("  ▂▂▂▂▂▂▂▂▂▂▂▂▂ \n");
     for(int i=0;i<14;i++)
     {
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_INTENSITY);
         printf("▕                                                                              ▏");
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY|FOREGROUND_BLUE); 
         printf(" |                          |\n");
     }
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_INTENSITY);
     printf("▕                                                                              ▏");
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY|FOREGROUND_BLUE); 
     printf(" |═════════════|\n");
     for(int i=0;i<24;i++)
     {
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_INTENSITY);
         printf("▕                                                                              ▏");
         SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), FOREGROUND_INTENSITY|FOREGROUND_BLUE); 
         printf(" |                          |\n");
     }
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_GREEN|FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_INTENSITY);
     printf("  ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔  ");
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY| FOREGROUND_BLUE); 
     printf(" ﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊﹊\n");
     SideScreen ();  //打印副屏幕
 }
 void PrintMap()     // 打印地图(地图既地图障碍物)
 {
     for(int j=0;j<41;j++)
         for(int i=0;i<41;i++)
             if(map[i][j]==6)
             {
                 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN
                     |FOREGROUND_RED|FOREGROUND_BLUE|BACKGROUND_GREEN|BACKGROUND_RED|BACKGROUND_BLUE);
                 GoToxy(2*j,i);
                 printf("■");
             }
             else if(map[i][j]==2)
             {
                 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED|BACKGROUND_GREEN|BACKGROUND_RED);
                 GoToxy(2*j,i);
                 printf("▓");
             }
             else if(map[i][j]==1)
             {
                 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|BACKGROUND_GREEN|BACKGROUND_RED);
                 GoToxy(2*j,i);
                 printf("▓");
             }
             else if(map[i][j]==5)
             {                      
                 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|BACKGROUND_BLUE|FOREGROUND_BLUE|FOREGROUND_GREEN);
                 GoToxy(2*j,i);
                 printf("~");
             }
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
     GoToxy(38,37);     printf("◣◢");
     GoToxy(38,38);     printf("███");    //∵无论地图怎么变,家所在位置不变,且家的字符多种,不方便用上述方式打印
     GoToxy(38,39);     printf("◢█◣");    //∴直接打印(且家的map值与符号无关)
 }
 void GetMap()      //地图存放函数
 {                   //map里的值: 个位数的值为地图方块部分,百位数的值为坦克
     int i ,j;      //map里的值: 0为可通过陆地,1为红砖,2待定,5为水,100为敌方坦克,200为我的坦克,
     int Map[8][41][41]=
     {
         {
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
             {4,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,4},
             {4,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,4}, 
             {4,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,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4}, 
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4}, 
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4}, 
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4}, 
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,6,6,6,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,6,6,6,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,6,6,6,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4}, 
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4}, 
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,4},
             {4,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,4}, 
             {4,6,6,6,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,6,6,6,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4}, 
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}
         },
         {
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,2,2,2,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,2,2,2,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,2,2,2,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,6,6,6,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,6,6,6,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,6,6,6,0,0,0,4},
             {4,1,1,1,2,2,2,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,6,6,6,0,0,0,4},
             {4,1,1,1,2,2,2,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,6,6,6,0,0,0,4},
             {4,1,1,1,2,2,2,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,6,6,6,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,2,2,2,1,1,1,6,6,6,6,6,6,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,2,2,2,1,1,1,6,6,6,6,6,6,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,2,2,2,1,1,1,6,6,6,6,6,6,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,2,2,2,6,6,6,1,1,1,2,2,2,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,2,2,2,6,6,6,1,1,1,2,2,2,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,2,2,2,6,6,6,1,1,1,2,2,2,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,1,1,1,6,6,6,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,1,1,1,6,6,6,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,1,1,1,6,6,6,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,1,6,6,6,1,1,1,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,1,6,6,6,1,1,1,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,1,6,6,6,1,1,1,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,2,2,2,1,1,1,6,6,6,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,2,2,2,1,1,1,6,6,6,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,2,2,2,1,1,1,6,6,6,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,6,6,6,6,6,6,6,6,6,2,2,2,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,6,6,6,6,6,6,6,6,6,2,2,2,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,6,6,6,6,6,6,6,6,6,2,2,2,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,6,6,6,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,6,6,6,6,6,6,0,0,0,0,0,0,4},
             {4,6,6,6,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,6,6,6,6,6,6,0,0,0,0,0,0,4},
             {4,6,6,6,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,6,6,6,6,6,6,0,0,0,0,0,0,4},
             {4,6,6,6,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,1,1,1,1,1,1,0,0,0,4},
             {4,6,6,6,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,1,1,1,1,1,1,0,0,0,4},
             {4,6,6,6,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,1,1,1,1,1,1,0,0,0,4},
             {4,2,2,2,6,6,6,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,6,6,6,6,6,6,4},
             {4,2,2,2,6,6,6,6,6,6,6,6,6,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,6,6,6,6,6,6,4},
             {4,2,2,2,6,6,6,6,6,6,6,6,6,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,6,6,6,6,6,6,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,4},
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}
         },
         {
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,4},
             {4,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,1,0,0,0,6,6,6,0,0,0,0,0,0,4},
             {4,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,1,0,0,0,6,6,6,0,0,0,0,0,0,4},
             {4,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,1,0,0,0,6,6,6,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,1,1,1,6,6,6,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,1,1,1,6,6,6,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,4},
             {4,6,6,6,0,0,0,1,1,1,5,5,5,0,0,0,6,6,6,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,5,5,5,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,5,5,5,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,5,5,5,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,5,5,5,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,5,5,5,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,1,1,1,0,0,0,1,1,1,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,1,1,1,4},
             {4,1,1,1,0,0,0,1,1,1,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,1,1,1,4},
             {4,1,1,1,0,0,0,1,1,1,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,1,1,1,4},
             {4,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,5,5,5,0,0,0,6,6,6,6,6,6,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,5,5,5,0,0,0,1,1,1,1,1,1,4},
             {4,1,1,1,1,1,1,0,1,1,1,1,1,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,5,5,5,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,5,5,5,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,6,6,6,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,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},    
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}
         },
         {
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
             {4,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,4},
             {4,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,4},
             {4,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,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,6,6,6,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,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,4},
             {4,0,0,0,0,0,0,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,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,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,0,0,0,0,0,4},
             {4,6,6,6,0,0,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,0,0,0,4},
             {4,0,0,0,0,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,1,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,1,0,1,1,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,1,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,1,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,5,5,5,0,0,0,0,1,1,1,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,4},
             {4,5,5,5,0,0,0,0,1,1,1,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,4},
             {4,5,5,5,0,0,0,0,1,1,1,0,0,0,6,0,0,0,0,0,6,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,5,5,5,4},
             {4,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,5,5,5,4},
             {4,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,0,0,0,0,0,0,0,5,5,5,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,0,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,0,0,0,0,0,0,0,4},
             {4,0,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,0,0,0,0,0,0,0,4},
             {4,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,1,1,0,0,0,0,0,0,0,4},
             {4,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,1,1,1,1,0,0,0,0,0,0,4},
             {4,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,1,1,1,1,0,0,0,0,0,0,4},
             {4,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,1,1,1,1,0,0,0,0,0,0,4},
             {4,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,1,1,1,1,1,1,1,0,0,0,0,4},
             {4,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,1,1,1,1,1,1,1,0,0,0,0,4},
             {4,0,0,0,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,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,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,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,4},
             {4,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,1,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,4},
             {4,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,4},
             {4,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,4},
             {4,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,4},
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}
         },
         {
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,4},
             {4,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,4},
             {4,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5,4},
             {4,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,6,6,6,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,6,6,6,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,6,6,6,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,4},
             {4,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,5,5,5,5,5,5,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,5,5,5,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,5,5,5,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,5,5,5,4},
             {4,0,0,0,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,1,1,1,0,0,0,5,5,5,4},
             {4,0,0,0,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,1,1,1,0,0,0,5,5,5,4},
             {4,0,0,0,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,1,1,1,0,0,0,5,5,5,4},
             {4,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,5,5,5,4},
             {4,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,5,5,5,4},
             {4,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,5,5,5,4},
             {4,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,0,0,0,5,5,5,1,1,1,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,4},
             {4,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,0,0,0,5,5,5,1,1,1,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,4},
             {4,5,5,5,5,5,5,0,0,0,5,5,5,5,5,5,0,0,0,5,5,5,1,1,1,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,5,5,5,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,5,5,5,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,0,0,0,5,5,5,4},
             {4,0,0,0,5,5,5,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,4},
             {4,0,0,0,5,5,5,5,5,5,5,5,5,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,4},
             {4,0,0,0,5,5,5,5,5,5,5,5,5,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,5,5,5,0,0,0,5,5,5,5,5,5,4},
             {4,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,5,5,5,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}
         },
         {
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
             {4,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,4},
             {4,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,4},
             {4,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,4},
             {4,0,0,0,0,0,0,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,1,1,1,1,0,0,0,4},
             {4,0,0,0,0,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,1,1,1,1,1,1,1,1,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,1,0,0,0,0,0,0,2,2,2,2,0,0,0,0,0,0,1,1,1,1,0,0,0,1,1,0,4},
             {4,0,0,1,1,1,0,0,0,0,0,0,1,1,1,0,0,0,0,2,2,2,2,2,2,0,0,0,0,1,1,1,0,0,0,0,0,0,1,1,4},
             {4,0,1,1,0,0,0,0,0,0,0,0,0,1,1,0,0,0,2,2,2,2,2,2,2,2,0,0,0,1,1,0,0,0,0,0,0,0,1,1,4},
             {4,0,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,2,2,2,2,2,2,2,2,0,0,1,1,1,0,0,0,0,0,0,0,1,1,4},
             {4,1,1,0,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,0,0,0,0,0,0,0,0,1,1,4},
             {4,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,0,0,0,0,0,0,0,0,1,1,4},
             {4,1,1,0,0,0,0,0,0,0,0,0,0,0,1,1,2,2,2,2,2,2,2,2,2,2,2,2,1,1,0,0,0,0,0,0,0,0,1,1,4},
             {4,1,1,0,0,0,0,0,0,0,0,0,1,1,1,2,2,2,2,6,6,6,6,6,6,2,2,2,2,1,1,1,0,0,0,0,0,1,1,1,4},
             {4,1,1,0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,6,6,6,6,6,6,2,2,2,2,1,1,1,1,0,0,0,0,1,1,1,4},
             {4,1,1,0,0,0,0,0,0,0,1,1,1,1,1,2,2,2,2,6,6,6,6,6,6,2,2,2,2,1,1,1,1,0,0,0,1,1,1,1,4},
             {4,0,1,1,0,0,0,0,0,0,1,1,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,1,1,0,0,1,1,1,1,4},
             {4,0,1,1,1,0,0,0,0,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1,4},
             {4,0,0,1,1,1,1,1,1,1,1,1,1,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,1,1,1,1,1,1,1,1,1,4},
             {4,0,0,0,1,1,1,1,1,1,1,1,1,6,6,6,6,6,6,1,1,1,6,6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1,0,4},
             {4,0,0,0,1,1,1,1,1,1,1,1,1,6,6,6,6,6,6,1,1,1,6,6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1,0,4},
             {4,0,0,0,0,1,1,1,1,1,1,1,1,6,6,6,6,6,6,1,1,1,6,6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,0,0,4},
             {4,0,0,0,0,0,1,1,1,1,1,1,1,6,6,6,0,0,0,1,1,1,0,0,0,6,6,6,1,1,1,1,1,1,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,1,6,6,6,0,0,0,1,1,1,0,0,0,6,6,6,1,1,1,1,1,1,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,1,6,6,6,0,0,0,1,1,1,0,0,0,6,6,6,1,1,1,1,1,1,1,1,1,0,0,0,4},
             {4,0,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,1,1,1,1,1,0,0,0,4},
             {4,0,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,1,1,1,1,0,0,0,0,4},
             {4,0,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,1,1,1,1,0,0,0,0,4},
             {4,1,1,1,0,0,0,1,1,1,1,1,1,1,1,1,6,6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,1,1,1,4},
             {4,1,1,1,0,0,0,0,1,1,1,1,1,1,1,1,6,6,6,6,6,6,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,1,1,1,4},
             {4,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,4},
             {4,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,1,1,1,4},
             {4,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,1,1,1,4},
             {4,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,1,1,1,4},
             {4,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,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,1,1,0,0,0,0,0,0,0,4},
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}
         },
         {
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
             {4,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,6,6,6,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,6,6,6,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,6,6,6,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,6,6,6,0,0,0,6,6,6,6,6,6,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,6,6,6,0,0,0,6,6,6,6,6,6,4},
             {4,0,0,0,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,6,6,6,0,0,0,6,6,6,6,6,6,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,6,6,6,1,1,1,0,0,0,0,0,0,0,0,0,6,6,6,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,6,6,6,1,1,1,0,0,0,0,0,0,0,0,0,6,6,6,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,6,6,6,1,1,1,0,0,0,0,0,0,0,0,0,6,6,6,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,6,6,6,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,6,6,6,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,6,6,6,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,4},
             {4,6,6,6,0,0,0,6,6,6,0,0,0,0,0,0,1,1,1,0,0,0,6,6,6,0,0,0,0,0,0,6,6,6,1,1,1,0,0,0,4},
             {4,6,6,6,0,0,0,6,6,6,0,0,0,0,0,0,1,1,1,0,0,0,6,6,6,0,0,0,0,0,0,6,6,6,1,1,1,0,0,0,4},
             {4,6,6,6,0,0,0,6,6,6,0,0,0,0,0,0,1,1,1,0,0,0,6,6,6,0,0,0,0,0,0,6,6,6,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,0,0,0,4},
             {4,0,0,0,6,6,6,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,4},
             {4,0,0,0,6,6,6,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,4},
             {4,0,0,0,6,6,6,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,1,1,1,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,4},
             {4,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,6,6,6,0,0,0,6,6,6,0,0,0,0,0,0,1,1,1,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,6,6,6,0,0,0,6,6,6,0,0,0,0,0,0,1,1,1,4},
             {4,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,1,1,1,6,6,6,0,0,0,6,6,6,0,0,0,0,0,0,1,1,1,4},
             {4,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,0,0,0,4},
             {4,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,1,1,6,6,6,0,0,0,0,0,0,4},
             {4,1,1,1,0,0,0,1,1,1,1,1,1,0,0,0,0,1,1,1,1,1,1,1,0,0,0,0,1,1,1,6,6,6,0,0,0,0,0,0,4},
             {4,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,4},
             {4,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,4},
             {4,1,1,1,0,0,0,1,1,1,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,1,1,1,1,1,1,1,1,1,0,0,0,4},
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}
         },
         {
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4},
             {4,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,1,0,0,0,0,0,0,4},
             {4,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,1,0,0,0,0,0,0,4},
             {4,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,1,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,5,5,5,5,5,5,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,5,5,5,5,5,5,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,5,5,5,5,5,5,0,0,0,6,6,6,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,5,5,5,5,5,5,1,1,1,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,6,6,6,0,0,0,4},
             {4,0,0,0,0,0,0,5,5,5,5,5,5,1,1,1,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,6,6,6,0,0,0,4},
             {4,0,0,0,0,0,0,5,5,5,5,5,5,1,1,1,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,6,6,6,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,1,1,1,0,0,0,0,0,0,4},
             {4,0,0,0,6,6,6,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,6,6,6,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,6,6,6,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,5,5,5,5,5,5,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,5,5,5,5,5,5,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,5,5,5,5,5,5,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,4},
             {4,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,6,6,6,0,0,0,0,0,0,6,6,6,4},
             {4,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,6,6,6,0,0,0,0,0,0,6,6,6,4},
             {4,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,6,6,6,0,0,0,0,0,0,6,6,6,4},
             {4,0,0,0,1,1,1,5,5,5,5,5,5,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,5,5,5,5,5,5,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,1,1,1,5,5,5,5,5,5,0,0,0,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,6,6,6,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,4},
             {4,6,6,6,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,4},
             {4,6,6,6,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,0,0,0,1,1,1,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,4},
             {4,0,0,0,0,0,0,0,0,0,6,6,6,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,5,5,5,5,5,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,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,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,0,0,0,0,0,0,1,1,1,0,0,0,1,1,1,0,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4},
             {4,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,4},
             {4,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,4},
             {4,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,9,9,9,1,1,0,0,0,0,0,0,0,1,1,1,6,6,6,0,0,0,4},
             {4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4,4}
         },
     };
         for(i=0;i<41;i++)
             for(j=0;j<41;j++)
                     map[i][j]=Map[level-1][i][j];
     PrintMap();         //打印地图
 }
 void GameOver(bool home)
 {
     int timing=0,color=1;
     while(1)
     {
         if(timing++%30==0)         //游戏结束原因为生命值为0
         {
             ColorChoose(color);    //颜色选择
             if(home)               //游戏结束原因为老家被毁,则多打印一行字以提示玩家
             {
                 GoToxy(37,19);     //主屏幕中心打印
                 printf("老家被毁!");
             }
             GoToxy(37,20);         //主屏幕中心打印
             printf("游戏结束!");
             GoToxy(100,13);        //副屏幕打印
             printf("游戏结束");
             GoToxy(88,17);
             printf("请按回车键重新开始!");
             GoToxy(88,18);
             printf("或按 Esc键退出游戏!");
             if(++color==8)
                 color=1;
         }
         if (GetAsyncKeyState( 0xD )& 0x8000)  //回车键
         {
 //            system("cls");       //清屏,这里清屏后再次打印框架有一定几率造成框架上移一行的bug,因此选用自建清屏函数
 //            Frame ();            //重新打印游戏框架
             score-=500;          //分数-500
             ClearMainScreen();   //主屏清屏函数,无需再次打印框架
             Initialize();        //从本关重新开始
             break;
         }
         else if(GetAsyncKeyState( 0x1B )& 0x8000)  //Esc键退出    
             exit(0);
         Sleep(20);
     }
 }
 void NextLevel()
 {
     int timing=0,color=1;
     level++;
     if(level<=MAX_LEVEL)
         while(1)
         {
             if(timing++%10==0)
             {
                 ColorChoose(color);   //颜色选择   
                 GoToxy(37,20);        //主屏幕中心打印
                 printf("恭喜过关!");
                 GoToxy(100,13);       //副屏幕打印
                 printf("等待下关");
                 GoToxy(87,17);
                 printf("请按回车键进入下一关!");
                 GoToxy(88,18);
                 printf("或按 Esc键退出游戏!");
                 if(++color==8)    
                     color=1;
             }
             if (GetAsyncKeyState( 0xD )& 0x8000)  //回车键
             {
                 GoToxy(88,17);        //抹除副屏幕中的提示
                 printf("                     ");
                 GoToxy(88,18);
                 printf("                     ");
                 ClearMainScreen();   //主屏清屏函数,无需再次打印框架
                 Initialize();        //初始化从下一关开始,level已++
                 break;
             }
             else if(GetAsyncKeyState( 0x1B )& 0x8000)  //Esc键退出    
                 exit(0);
             Sleep(20);
         }
     else   //level>8 通关
         while(1)
         {
             if(timing++%5==0)
             {
                 ColorChoose(color);
                 GoToxy(33,20);        //主屏幕中心打印
                 printf("恭喜通过全部关卡!");
                 GoToxy(100,13);       //副屏幕打印
                 printf("已通全关");
                 GoToxy(88,17);
                 printf("恭喜通过全部关卡!");
                 GoToxy(88,19);
                 printf("按 Esc键退出游戏!");
                 if(++color==8)    
                     color=1;
             }
             if(GetAsyncKeyState( 0x1B )& 0x8000)  //Esc键退出    
                 exit(0);
             Sleep(10);
         }
 }
 void GameCheak()
 {                           //剩余敌人为0且四坦克全部不存活
     if(remain_enemy<=0 && !AI_tank[0].alive && !AI_tank[1].alive && !AI_tank[2].alive && !AI_tank[3].alive )
         NextLevel();        //进入下一关
     if(my_tank.revive>=MAX_LIFE)   //我的生命值(复活次数)全部用完 MAX_LIFE
         GameOver(0);        //游戏结束,传入0代表我的复活次数用光(生命值为0)。游戏结束有两种判断,另一种是老家被毁
 }
 void SideScreen ()  //副屏幕 行(84起,110末,若双字符宽则在108打印最后一个字)列(11上屏末,13下屏初,39下屏末。为美观最好打在38)
 {                   // |         第  d  关         |   " |                          |\n"
     GoToxy(93,2);
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED);
     printf("第     关");
     GoToxy(92,5);
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);
     printf("分  数:");
     GoToxy(92,7);
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
     printf("生  命:");
     GoToxy(86,9);
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
     printf("剩余敌方坦克:");
     GoToxy(86,11);
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
     printf("当前游戏速度:  %d",21-speed);
     GoToxy(86,13);
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_BLUE);
     printf("当前游戏状态:");
     GoToxy(94,19);
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED);
     GoToxy(94,24);
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED);
     printf("帮  助");
     GoToxy(86,27);
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
     printf("方向键  ←↑→↓  移动");
     GoToxy(93,29);
     printf("x 键 射击");
     GoToxy(89,31);
     printf("+ - 调整游戏速度");
     GoToxy(90,33);
     printf("游戏速度范围1~20");
     GoToxy(90,35);
     printf("回车键 暂停游戏");
     GoToxy(90,37);
     printf("Esc键  退出游戏");
 /*    printf("帮  助");     //这是第二种详细说明的样式
     GoToxy(86,21);
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
     printf("方向键  ←↑→↓  移动");
     GoToxy(93,23);
     printf("x 键 射击");
     GoToxy(89,25);
     printf("+ - 调整游戏速度");
     GoToxy(90,27);
     printf("游戏速度范围1~20");
     GoToxy(90,29);
     printf("回车键 暂停游戏");
     GoToxy(90,31);
     printf("Esc键  退出游戏");
     GoToxy(86,33);
     printf("敌方坦克全部消灭则过关");
     GoToxy(87,34);
     printf("己方坦克生命值为0 或");
     GoToxy(86,35);
     printf("正下方的老家被毁则失败");
     GoToxy(86,36);
     printf("己坦克与敌坦克子弹碰撞");
     GoToxy(87,37);
     printf("则抵消,敌坦克间子弹碰");
     GoToxy(86,38);
     printf("撞不抵消且可穿过敌坦克");*/
 }
 void Initialize()      //初始化
 {
     remain_enemy=16;
     my_tank.revive=0;  //我的坦克复活次数为0
     position=0;
     bul_num=0;
     GetMap();
     BuildMyTank( &my_tank );
     for(int i=0;i<12;i++)     //子弹初始化
     {
         bullet [i].exist=0;
         bullet [i].initial=0;
     }
     for(int i=0;i<=3;i++)         //AI坦克初始化
     {
         AI_tank [i].revive=0;
         AI_tank [i].alive=0;  //初始化坦克全是不存活的,BuildAITank()会建立重新建立不存活的坦克
         AI_tank [i].stop=0;
         AI_tank [i].num=i;
         AI_tank [i].my=0;
         AI_tank [i].CD=0;
     }
     GoToxy(97,2);                        //在副屏幕上关卡数
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
     printf("%d",level);
     GoToxy(102,5);                       //在副屏幕上打印分数
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN|FOREGROUND_RED|FOREGROUND_BLUE);
     printf("%d   ",score);
     GoToxy(102,7);                       //在副屏幕打印我的剩余生命值
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
     printf("%d", MAX_LIFE-my_tank.revive);
     GoToxy(102,9);                       //在副屏幕上打印剩余坦克数
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
     printf("%d ",remain_enemy);
     GoToxy(100,13);                      //在副屏幕上打印状态
     SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_GREEN);
     printf("正在游戏");
 }

  

双人对打
#include<iostream>
#include<cstdio>
#include<windows.h>
#include<conio.h>
#include<pthread.h>
#include<string>
#include<ctime>
#include<map>
#pragma comment(lib, "pthreadVC2.lib")
using namespace std;
#define cls; system("cls");
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
#define bluedark 1
#define greendark 2
#define cyandark 3
#define reddark 4
#define purple 5
#define yellowdark 6
#define whitedark 7
#define gray 8
#define blue 9
#define green 10
#define cyan 11
#define red 12
#define pink 13
#define yellow 14
#define white 15
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
#define brown 4
string plr[1110]= {"","★","▲","●","■","◆"};
string csmp[10][310][310]= {
    {
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","▓","▓","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","▓","▓","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","▓","▓","▓","▓","▓","▓","▓","  ","▓","▓","▓","▓","▓","▓","▓","▓","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","▓","▓","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","▓","▓","▓","  ","  ","▓","▓","▓","▓","▓","▓","▓","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","  "},
        {"▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓"},
    },
    {
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  "},
        {"  ","▓","▓","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","▓","▓","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","▓","▓","▓","▓","▓","▓","▓","  ","  ","▓","▓","▓","▓","▓","▓","▓","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","▓","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","▓","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  "},
        {"  ","  ","  ","▓","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","▓","  ","  ","  "},
        {"  ","▓","▓","▓","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","▓","▓","▓","  "},
        {"▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓"},
    },
    {
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","▓","▓","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","▓","▓","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","▓","▓","  ","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","  ","▓","▓","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","▓","  ","  ","  "},
        {"  ","  ","▓","▓","▓","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","▓","▓","▓","  ","  "},
        {"▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","▓"},
        {"▓","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓"},
        {"▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","▓"},
        {"▓","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓"},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","▓","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","  "},
        {"▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓"},
    },
    {
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  "},
        {"  ","  ","▓","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","▓","  ","▓","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","▓","▓","  ","▓","▓","▓","  ","▓","  ","▓","▓","  ","▓","  ","▓","▓","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","▓","  ","  ","  "},
        {"  ","  ","▓","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","  ","  ","  ","  "},
        {"▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"▓","  ","  ","  ","  ","  ","  ","  ","▓","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","▓"},
        {"▓","  ","  ","  ","  ","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓"},
        {"▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓"},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓"},
    },
};
int STT=1;
int jump1=2,jump2=2;
int x1,y1,x2,y2;
int health1,health2;
int mag1,mag2;
int atk1,atk2;
int cx1,cx2;
int startgame=0;
string js1,js2;
map<string,int>plco;
namespace _game {
    string mp[310][310]= {
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","▓","▓","▓","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","▓","▓","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","▓","▓","▓","▓","▓","▓","▓","  ","▓","▓","▓","▓","▓","▓","▓","▓","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","▓","▓","▓","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","▓","▓","▓","  ","  ","▓","▓","▓","▓","▓","▓","▓","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  ","  "},
        {"  ","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","  "},
        {"▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓","▓"},
    };
    bool check(char c) {
        return KEY_DOWN(c);
    }
    void place(const int x, const int y) {
        COORD PlaceCursorHere;
        PlaceCursorHere.X = y;
        PlaceCursorHere.Y = x;
        SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), PlaceCursorHere);
        return;
    }
    void color(int x) {
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),x);
    }
    int click() {
        return GetAsyncKeyState(VK_LBUTTON);
    }
    void hidden() {
        //隐藏光标
        HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
        CONSOLE_CURSOR_INFO cci;
        GetConsoleCursorInfo(hOut,&cci);
        cci.bVisible=0;
        SetConsoleCursorInfo(hOut,&cci);
        return;
    }
    int search(int x0,int y0,int x,int y) {
        int xx,yy;
        POINT pt;
        HWND h=GetForegroundWindow();
        GetCursorPos(&pt);
        ScreenToClient(h,&pt);
        xx=pt.y/16;
        yy=pt.x/8;
        if(xx>=x0 && xx<=x && yy>=y0 && yy<=y)
            if(click())
                return 2;
            else return 1;
        return 0;
    }
    void jz() {
        int i,xxxx,j;
        string jz[8]= {"▏","▎","▍","▌","▋","▊","▉"};
        color(7);
        for(i=1; i<=136; i++) {
            xxxx=i%8;
            COORD pos = {0, 0};
            SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
            color(15);
            printf(" Please Loading...    \n");
            printf("----------------------------------\n");
            color(10);
            for(j=1; j<=i/8; j++)
                printf("█");
            cout<<jz[xxxx]<<endl;
            color(15);
            printf("----------------------------------\n");
        }
        cls;
    }
}
using namespace _game;
void* xstime(void* args) {
    SYSTEMTIME sys;
    place(51,40);
    GetLocalTime(&sys);
    printf("        %4d/%02d/%02d %02d:%02d:%02d 星期%1d",sys.wYear,sys.wMonth,sys.wDay,sys.wHour,sys.wMinute,sys.wSecond,sys.wDayOfWeek);
    place(0,0);
    return NULL;
}
void op() {
    cls;
    for(int i=0; i<22; i++) {
        for(int j=0; j<20; j++) {
            if(mp[i][j]=="★")color(yellow);
            if(mp[i][j]=="▲")color(cyan);
            if(mp[i][j]=="●")color(pink);
            if(mp[i][j]=="■")color(red);
            if(mp[i][j]=="◆")color(blue);
            if(mp[i][j]=="▓")color(reddark);
            cout<<mp[i][j];
        }
        cout<<endl;
    }
}
void* jumpl1(void* args) {
    double jumpt1,jumpt2;
    jumpt2=jumpt1=clock();
    while(startgame) {
        while(jump1!=2 && mp[x1+1][y1]!="▓" && mp[x1+1][y1]!=js2) {
            jumpt2=clock();
            if(jumpt2-jumpt1>=333) {
                mp[x1][y1]="  ";
                mp[++x1][y1]=js1;
                jumpt1=jumpt2;
                op();
            }
        }
        jump1=2;
    }
}
void* jumpl2(void* args) {
    double jumpt1,jumpt2;
    jumpt2=jumpt1=clock();
    while(startgame) {
        while(jump2!=2 && mp[x2+1][y2]!="▓" && mp[x2+1][y2]!=js1) {
            jumpt2=clock();
            if(jumpt2-jumpt1>=333) {
                mp[x2][y2]="  ";
                mp[++x2][y2]=js2;
                jumpt1=jumpt2;
                op();
            }
        }
        jump2=2;
    }
}
void stgame() {
    cls;
    x1=20,x2=20,y1=0,y2=19;
    int win;
    int cho=1;
    char ch;
    while(1) {
        cls;
        printf("Player1选择角色:\n");
        for(int i=1; i<=5; i++) {
            if(cho==i) color(plco[plr[i]]);
            else color(gray);
            cout<<plr[i];
        }
        color(white);
        ch=getch();
        if(ch=='a' || ch=='A' || ch==LEFT) {
            if(cho>1) {
                cho--;
            }
        }
        if(ch=='d' || ch=='D' || ch==RIGHT) {
            if(cho<5) {
                cho++;
            }
        }
        if(ch==13) {
            printf("\nPlayer1:");
            switch(cho) {
                case 1:
                    color(yellow);
                    printf("★");
                    health1=1000;
                    js1="★";
                    atk1=20;
                    break;
                case 2:
                    color(cyan);
                    printf("▲");
                    health1=600;
                    js1="▲";
                    atk1=40;
                    break;
                case 3:
                    color(pink);
                    printf("●");
                    health1=800;
                    js1="●";
                    atk1=30;
                    break;
                case 4:
                    color(red);
                    printf("■");
                    health1=2000;
                    js1="■";
                    atk1=15;
                    break;
                case 5:
                    color(blue);
                    printf("◆");
                    health1=700;
                    js1="◆";
                    atk1=10;
                    break;
            }
            break;
        }
    }
    color(white);
    Sleep(1000);
    while(1) {
        cls;
        printf("Player2选择角色:\n");
        for(int i=1; i<=5; i++) {
            if(cho==i) color(plco[plr[i]]);
            else color(gray);
            cout<<plr[i];
        }
        color(white);
        ch=getch();
        if(ch=='a' || ch=='A' || ch==LEFT) {
            if(cho>1) {
                cho--;
            }
        }
        if(ch=='d' || ch=='D' || ch==RIGHT) {
            if(cho<5) {
                cho++;
            }
        }
        if(ch==13) {
            printf("\nPlayer2:");
            switch(cho) {
                case 1:
                    color(yellow);
                    printf("★");
                    health2=1000;
                    atk2=20;
                    js2="★";
                    break;
                case 2:
                    color(cyan);
                    printf("▲");
                    health2=600;
                    atk2=40;
                    js2="▲";
                    break;
                case 3:
                    color(pink);
                    printf("●");
                    health2=800;
                    atk2=30;
                    js2="●";
                    break;
                case 4:
                    color(red);
                    printf("■");
                    health2=2000;
                    atk2=15;
                    js2="■";
                    break;
                case 5:
                    color(blue);
                    printf("◆");
                    health2=700;
                    js2="◆";
                    atk2=10;
                    break;
            }
            break;
        }
    }
    color(white);
    Sleep(1000);
    cho=0;
    int rett=1;
    while(1) {
        cls;
        color(white);
        printf("选择地图:\n");
        if(cho==0) {
            printf("%d:随机地图\n",cho+1);
            color(brown);
            for(int i=0; i<22; i++) {
                for(int j=0; j<20; j++) {
                    printf("?");
                }
                printf("\n");
            }
        }
        if(cho==1) {
            printf("%d:海盗船\n",cho+1);
            color(brown);
            for(int i=0; i<22; i++) {
                for(int j=0; j<20; j++) {
                    cout<<csmp[0][i][j];
                }
                printf("\n");
            }
        }
        if(cho==2) {
            printf("%d:竞技场\n",cho+1);
            color(brown);
            for(int i=0; i<22; i++) {
                for(int j=0; j<20; j++) {
                    cout<<csmp[1][i][j];
                }
                printf("\n");
            }
        }
        if(cho==3) {
            printf("%d:空中祭坛\n",cho+1);
            color(brown);
            for(int i=0; i<22; i++) {
                for(int j=0; j<20; j++) {
                    cout<<csmp[2][i][j];
                }
                printf("\n");
            }
        }
        if(cho==4) {
            printf("%d:浮空岛\n",cho+1);
            color(brown);
            for(int i=0; i<22; i++) {
                for(int j=0; j<20; j++) {
                    cout<<csmp[3][i][j];
                }
                printf("\n");
            }
        }
        ch=getch();
        if(ch=='a' || ch=='A' || ch==LEFT) {
            if(cho>0) {
                cho--;
            }
        }
        if(ch=='d' || ch=='D' || ch==RIGHT) {
            if(cho<4) {
                cho++;
            }
        }
        if(ch==13) {
            if(cho==0) rett=rand()%4;
            else rett=cho-1;
            break;
        }
    }
    for(int i=0; i<22; i++) {
        for(int j=0; j<20; j++) {
            mp[i][j]=csmp[rett][i][j];
        }
    }
    cls;
    Sleep(1000);
    mag1=mag2=0;
    cx1=cx2=0;
    mp[x1][y1]=js1;
    mp[x2][y2]=js2;
    char choice;
    double mpsx,sx;
    mpsx=sx=clock();
    startgame=1;
    double jumpt1,jumpt2;
    double jumpe1,jumpe2;
//  pthread_t tid1,tid2;
//  pthread_create(&tid1,NULL,&jumpl1,NULL);
//  pthread_create(&tid2,NULL,&jumpl2,NULL);
    op();
    while(health1>0 && health2>0) {
        color(red);
        place(23,0);
        printf("P1:hp:%4d      P2:hp:%4d",health1,health2);
        place(24,0);
        color(blue);
        printf("P1:mp:%4d      P2:mp:%4d",mag1,mag2);
        if(mp[x1+1][y1]=="▓" || mp[x1+1][y1]==js2) jump1=2;
        if(mp[x2+1][y2]=="▓" || mp[x2+1][y2]==js1) jump2=2;
        jumpe1=jumpe2=clock();
        if(jump1==2 && (mp[x1+1][y1]=="▓" || mp[x1+1][y1]==js2)) jumpt1=jumpe1;
        else if(jumpe1-jumpt1>=233) {
            color(plco[js1]);
            place(x1,y1*2);
            mp[x1][y1]="  ";
            cout<<"  ";
            mp[++x1][y1]=js1;
            place(x1,y1*2);
            cout<<js1;
            jumpt1=jumpe1;
        }
        if(jump2==2 && (mp[x2+1][y2]=="▓" || mp[x2+1][y2]==js1)) jumpt2=jumpe2;
        else if(jumpe2-jumpt2>=233) {
            color(plco[js2]);
            place(x2,y2*2);
            mp[x2][y2]="  ";
            cout<<"  ";
            mp[++x2][y2]=js2;
            place(x2,y2*2);
            cout<<js2;
            jumpt2=jumpe2;
        }
        sx=clock();
        if(kbhit()) {
            choice=getch();
            if(choice=='a') {
                if(y1-1>=0 && mp[x1][y1-1]!="▓" && mp[x1][y1-1]!=js2) {
                    mp[x1][y1]="  ";
                    mp[x1][--y1]=js1;
                    place(x1,y1*2);
                    color(plco[js1]);
                    cout<<js1<<"  ";
                }
                cx1=-1;
            }
            if(choice=='d') {
                if(y1+1<=19 && mp[x1][y1+1]!="▓" && mp[x1][y1+1]!=js2) {
                    place(x1,y1*2);
                    mp[x1][y1]="  ";
                    mp[x1][++y1]=js1;
                    color(plco[js1]);
                    cout<<"  "<<js1;
                }
                cx1=1;
            }
            if(choice=='k' && jump1>0) {
                jumpt1=jumpe1;
                jump1--;
                for(int i=1; i<=3; i++)
                    if(x1-1>=0 && mp[x1-1][y1]!="▓" && mp[x1-1][y1]!=js2) {
                        place(x1,y1*2);
                        color(plco[js1]);
                        mp[x1][y1]="  ";
                        cout<<"  ";
                        mp[--x1][y1]=js1;
                        place(x1,y1*2);
                        cout<<js1;
                    } else break;
            }
            if(choice=='j') {
                if(js1=="★" && x1==x2 && (y2-y1)*cx1<=3 && (y2-y1)*cx1>=0) {
                    health2-=atk1;
                    mag2+=5;
                    mag1+=10;
                    if(health2<=0) {
                        win=1;
                        break;
                    }
                }
                if(js1=="▲" && (abs(x2-x1)<=3 && abs(y2-y1)<=3)) {
                    health2-=atk1;
                    mag2+=5;
                    mag1+=10;
                    if(health2<=0) {
                        win=1;
                        break;
                    }
                }
                if(js1=="●" && ((abs(x1-x2)<=3 && y1==y2) || (abs(y1-y2)<=3 && x1==x2))) {
                    health2-=atk1;
                    mag2+=5;
                    mag1+=10;
                    if(health2<=0) {
                        win=1;
                        break;
                    }
                }
                if(js1=="■" && (abs(x2-x1)<=1 && abs(y2-y1)<=1)) {
                    health2-=atk1;
                    mag2+=5;
                    mag1+=10;
                    if(health2<=0) {
                        win=1;
                        break;
                    }
                }
                if(js1=="◆" && x1==x2 && (y2-y1)*cx1<=10 && (y2-y1)*cx1>=0) {
                    int dam=40;
                    for(int i=y1+cx1; i>=0 && i<=19; i+=cx1) {
                        if(mp[x1][i]=="▓") break;
                        if(mp[x1][i]==js2) {
                            health2-=dam;
                            mag2+=5;
                            mag1+=10;
                            break;
                        }
                        dam-=4;
                    }
                    if(health2<=0) {
                        win=1;
                        break;
                    }
                }
            }
            if(choice=='y' && mag1>=30) {
                mag1-=30;
                for(int i=1; i<=3; i++) {
                    if(y1+cx1<=19 && y1+cx1>=0) {
                        if(mp[x1][y1+cx1]!="▓" && mp[x1][y1+cx1]!=js2) {
                            if(cx1==1) {
                                mp[x1][y1]="  ";
                                place(x1,y1*2);
                                color(plco[js1]);
                                cout<<"  "<<js1;
                                y1+=cx1;
                                mp[x1][y1]=js1;
                            } else {
                                mp[x1][y1]="  ";
                                y1+=cx1;
                                mp[x1][y1]=js1;
                                place(x1,y1*2);
                                color(plco[js1]);
                                cout<<js1<<"  ";
                            }
                        } else break;
                    }
                }
            }
            if(choice=='l' && mag1>=100) {
                mag1-=100;
                if(js1=="★") {
                    if(x1==x2 && (y2-y1)*cx1>0) {
                        mp[x2][y2]="  ";
                        health2-=150;
                        for(int i=1; i<=3; i++) {
                            if(y2+cx1>=0 && y2+cx1<=19 && mp[x2][y2+cx1]!="▓") {
                                y2+=cx1;
                            }
                        }
                        mp[x2][y2]=js2;
                    }
                }
                if(js1=="▲") {
                    int dam=0;
                    mp[x1][y1]="  ";
                    for(; y1+cx1>=0 && y1+cx1<=19 && y1+cx1!=y2 && mp[x1][y1+cx1]!="▓"; y1+=cx1) {
                        dam+=30;
                    }
                    mp[x1][y1]=js1;
                    if(y1+cx1==y2 && x1==x2) {
                        health2-=dam;
                        mp[x2][y2]="  ";
                        if(y2+cx1>0 && y2+cx1<19) {
                            y2+=cx1;
                        }
                        mp[x2][y2]=js2;
                    }
                }
                if(js1=="●") {
                    if(x1==x2 || y1==y2) {
                        health2-=150;
                    }
                }
                if(js1=="■") {
                    if(x1==x2) {
                        health2-=200;
                    }
                }
                if(js1=="◆") {
                    mp[x1][y1]="  ";
                    if((y2==0) && (mp[x2][1]=="▓") || (y2==19) && (mp[x2][18]=="▓")){
                        mag1+=100;
                        continue;
                    }
                    if(y2>=18 || mp[x2][y2+1]=="▓") {
                        y1=y2-2;
                        cx1=1;
                    } else if(y2<=1 || mp[x2][y2-1]=="▓") {
                        y1=y2+2;
                        cx1=-1;
                    } else {
                        y1=y2+cx2*2;
                        cx1=-cx2;
                    }
                    x1=x2;
                    mp[x1][y1]=js1;
                    health2-=200;
                    mp[x2][y2]="  ";
                    for(int i=1; i<=3; i++) {
                        if(y2+cx1>=0 && y2+cx1<=19 && mp[x2][y2+cx1]!="▓") {
                            y2+=cx1;
                        }
                    }
                    mp[x2][y2]=js2;
                }
                op();
            }
             //
             if(choice==LEFT) {
                if(y2-1>=0 && mp[x2][y2-1]!="▓" && mp[x2][y2-1]!=js1) {
                    mp[x2][y2]="  ";
                    mp[x2][--y2]=js2;
                    place(x2,y2*2);
                    color(plco[js2]);
                    cout<<js2<<"  ";
                }
                cx2=-1;
            }
            if(choice==RIGHT) {
                if(y2+1<=19 && mp[x2][y2+1]!="▓" && mp[x2][y2+1]!=js1) {
                    place(x2,y2*2);
                    mp[x2][y2]="  ";
                    mp[x2][++y2]=js2;
                    color(plco[js2]);
                    cout<<"  "<<js2;
                }
                cx2=1;
            }
            if(choice=='2' && jump2>0) {
                jumpt2=jumpe2;
                jump2--;
                for(int i=1; i<=3; i++)
                    if(x2-1>=0 && mp[x2-1][y2]!="▓" && mp[x2-1][y2]!=js1) {
                        place(x2,y2*2);
                        color(plco[js2]);
                        mp[x2][y2]="  ";
                        cout<<"  ";
                        mp[--x2][y2]=js2;
                        place(x2,y2*2);
                        cout<<js2;
                    } else break;
            }
            if(choice=='1') {
                if(js2=="★" && x1==x2 && (y1-y2)*cx2<=3 && (y1-y2)*cx2>=0) {
                    health1-=atk2;
                    mag1+=5;
                    mag2+=10;
                    if(health1<=0) {
                        win=2;
                        break;
                    }
                }
                if(js2=="▲" && (abs(x1-x2)<=3 && abs(y1-y2)<=3)) {
                    health1-=atk2;
                    mag1+=5;
                    mag2+=10;
                    if(health1<=0) {
                        win=2;
                        break;
                    }
                }
                if(js2=="●" && ((abs(x1-x2)<=3 && y1==y2) || (abs(y1-y2)<=3 && x1==x2))) {
                    health1-=atk2;
                    mag1+=5;
                    mag2+=10;
                    if(health1<=0) {
                        win=2;
                        break;
                    }
                }
                if(js2=="■" && (abs(x1-x2)<=1 && abs(y1-y2)<=1)) {
                    health1-=atk2;
                    mag1+=5;
                    mag2+=10;
                    if(health1<=0) {
                        win=2;
                        break;
                    }
                }
                if(js2=="◆" && x1==x2 && (y1-y2)*cx2<=10 && (y1-y2)*cx2>=0) {
                    int dam=40;
                    for(int i=y2+cx2; i>=0 && i<=19; i+=cx2) {
                        if(mp[x2][i]=="▓") break;
                        if(mp[x2][i]==js1) {
                            health1-=dam;
                            mag1+=5;
                            mag2+=10;
                            break;
                        }
                        dam-=4;
                    }
                    if(health1<=0) {
                        win=2;
                        break;
                    }
                }
            }
            if(choice=='3' && mag2>=30) {
                mag2-=30;
                for(int i=1; i<=3; i++) {
                    if(y2+cx2<=19 && y2+cx2>=0) {
                        if(mp[x2][y2+cx2]!="▓" && mp[x2][y2+cx2]!=js1) {
                            if(cx2==1) {
                                mp[x2][y2]="  ";
                                place(x2,y2*2);
                                color(plco[js2]);
                                cout<<"  "<<js2;
                                y2+=cx2;
                                mp[x2][y2]=js2;
                            } else {
                                mp[x2][y2]="  ";
                                y2+=cx2;
                                mp[x2][y2]=js2;
                                place(x2,y2*2);
                                color(plco[js2]);
                                cout<<js2<<"  ";
                            }
                        } else break;
                    }
                }
            }
            if(choice=='8' && mag2>=100) {
                mag2-=100;
                if(js2=="★") {
                    if(x1==x2 && (y1-y2)*cx2>0) {
                        mp[x1][y1]="  ";
                        health1-=150;
                        for(int i=1; i<=3; i++) {
                            if(y1+cx2>=0 && y1+cx2<=19 && mp[x1][y1+cx2]!="▓") {
                                y1+=cx2;
                            }
                        }
                        mp[x1][y1]=js1;
                    }
                }
                if(js2=="▲") {
                    int dam=0;
                    mp[x2][y2]="  ";
                    for(; y2+cx2>=0 && y2+cx2<=19 && y2+cx2!=y1 && mp[x2][y2+cx2]!="▓"; y2+=cx2) {
                        dam+=30;
                    }
                    mp[x2][y2]=js2;
                    if(y2+cx2==y1 && x1==x2) {
                        health1-=dam;
                        mp[x1][y1]="  ";
                        if(y1+cx2>0 && y1+cx2<19) {
                            y1+=cx2;
                        }
                        mp[x1][y1]=js1;
                    }
                }
                if(js2=="●") {
                    if(x1==x2 || y1==y2) {
                        health1-=150;
                    }
                }
                if(js2=="■") {
                    if(x1==x2) {
                        health1-=200;
                    }
                }
                if(js2=="◆") {
                    if((y1==0) && (mp[x1][1]=="▓") || (y1==19) && (mp[x1][18]=="▓")){
                        mag1+=100;
                        continue;
                    }
                    mp[x2][y2]="  ";
                    if(y1>=18 || mp[x1][y1+1]=="▓") {
                        y2=y1-2;
                        cx2=1;
                    } else if(y1<=1 || mp[x1][y1-1]=="▓") {
                        y2=y1+2;
                        cx2=-1;
                    } else {
                        y2=y1+cx1*2;
                        cx2=-cx1;
                    }
                    x2=x1;
                    mp[x2][y2]=js2;
                    health1-=200;
                    mp[x1][y1]="  ";
                    for(int i=1; i<=3; i++) {
                        if(y1+cx2>=0 && y1+cx2<=19 && mp[x1][y1+cx2]!="▓") {
                            y1+=cx2;
                        }
                    }
                    mp[x1][y1]=js1;
                }
                op();
            }
        }
    }
    if(health1<health2) {
        win=2;
        health1=0;
    } else {
        win=1;
        health2=0;
    }
    color(red);
    place(23,0);
    printf("P1:hp:%4d      P2:hp:%4d",health1,health2);
    place(24,0);
    color(blue);
    printf("P1:mp:%4d      P2:mp:%4d",mag1,mag2);
    if(win==1) {
        color(plco[js1]);
        place(10,0);
        printf("                                             ");
        place(11,0);
        printf("               Player1胜出!                  ");
        place(12,0);
        printf("                                             ");
        Sleep(1000);
        getch();
        cls;
        return;
    }
    if(win==2) {
        color(plco[js2]);
        place(10,0);
        printf("                                             ");
        place(11,0);
        printf("               Player2胜出!                  ");
        place(12,0);
        printf("                                             ");
        Sleep(1000);
        getch();
        cls;
        return;
    }
}
void about() {
    cls;
    place(0,0);
    printf("Game Of Square:GOS :                      \n");
    color(yellow);
    printf("★ ");
    color(white);
    printf("创作者:喵喵                        \n");
    color(cyan);
    printf("▲ ");
    color(white);
    printf("技术支持:喵喵喵                        \n");
    color(pink);
    printf("● ");
    color(white);
    printf("游戏试玩:喵喵,喵喵喵                      \n");
    printf("     版本号:1.0.5                       \n");
    printf("     updating~~                         \n");
    printf("     1.0.1:加入了三张新地图             \n");
    printf("     1.0.2:冲刺与大招解锁               \n");
    printf("     1.0.3:帮助界面修改,界面缩小,加入选择地图\n");
    printf("     1.0.4:新加入角色弓手               \n");
    printf("     1.0.5:界面大改革                   \n");
    printf("                                        \n");
    printf("                                        \n");
    printf("                                        \n");
    printf("                                        \n");
    printf("                                        \n");
    printf("                                        \n");
    printf("                                        \n");
    printf("                                        \n");
}
void help() {
    cls;
    color(white);
    int choice=1;
    char ch;
    while(1) {
        cls;
        printf("游戏帮助 ");
        color(yellow);
        printf("★");
        color(cyan);
        printf("▲");
        color(pink);
        printf("●");
        color(red);
        printf("■\n");
        color(white);
        switch(choice) {
            case 1:
                printf("========================================\n\n");
                printf("本游戏采用竖剖面设计,攻击敌人攒魔\n");
                printf("操作规则:\n");
                color(pink);
                printf("P1:AD移动,K跳,J攻击,Y闪现,L大招\n");
                color(yellow);
                printf("P2:左右移动,2跳,1攻击,3闪现,8大招\n");
                color(white);
                printf("这个游戏有四个角色:\n\n");
                printf("========================================\n\n");
                break;
            case 2:
                printf("========================================\n\n");
                printf("First:基本角色:");
                color(yellow);
                printf("★\n");
                color(white);
                color(red);
                printf("血量: 1000");
                color(yellow);
                printf("  攻击力:20\n");
                color(white);
                printf("普攻:攻击前方三格\n");
                printf("大招:攻击前方并附带击退效果,伤害150\n\n");
                printf("========================================\n\n");
                break;
            case 3:
                printf("========================================\n\n");
                printf("Second:刺客:");
                color(cyan);
                printf("▲\n");
                color(white);
                color(red);
                printf("血量: 600");
                color(yellow);
                printf("  攻击力:40\n");
                color(white);
                printf("普攻:三格内都可以打到\n");
                printf("大招:向前冲刺,撞到敌人时附带击退三格,\n冲刺时距离敌人越远伤害越高\n\n");
                printf("========================================\n\n");
                break;
            case 4:
                printf("========================================\n\n");
                printf("Third:樱花:");
                color(pink);
                printf("●\n");
                color(white);
                color(red);
                printf("血量: 800");
                color(yellow);
                printf("  攻击力:30\n");
                color(white);
                printf("普攻:攻击三格之内十字区域\n");
                printf("大招:攻击整行整列,伤害150\n\n");
                printf("========================================\n\n");
                break;
            case 5:
                printf("========================================\n\n");
                printf("Fourth:坦克:");
                color(red);
                printf("■\n");
                color(white);
                color(red);
                printf("血量: 2000");
                color(yellow);
                printf("  攻击力:15\n");
                color(white);
                printf("普攻:攻击你周围一圈\n");
                printf("大招:攻击一整行,伤害200\n\n");
                printf("========================================\n\n");
                break;
            case 6:
                printf("========================================\n\n");
                printf("Last:弓手:");
                color(blue);
                printf("◆\n");
                color(white);
                color(red);
                printf("血量: 700");
                color(yellow);
                printf("  攻击力:距离敌人越近越大\n");
                color(white);
                printf("普攻:攻击你前方10格\n");
                printf("大招:闪现并且攻击击退,伤害200\n\n");
                printf("========================================\n\n");
                break;
        }
        color(green);
        if(choice==1) printf("  ");
        else printf("←");
        if(choice==6) printf("  ");
        else printf("→");
        color(pink);
        printf("\n\n(e退出)");
        color(white);
        ch=getch();
        if(ch=='a' || ch==LEFT) {
            if(choice>1) choice--;
        }
        if(ch=='d' || ch==RIGHT) {
            if(choice<6) choice++;
        }
        if(ch=='e') {
            break;
        }
    }
    cls;
}
void home() {
    srand((unsigned)time(0));
    char choi,choi2;
    plco["★"]=yellow;
    plco["▲"]=cyan;
    plco["●"]=pink;
    plco["■"]=red;
    plco["◆"]=blue;
    while(1) {
        place(0,0);
        printf("      ╭──╮ ╭──╮ ╭──╮\n");
        printf("      │╭─╯ │╭╮│ │╭─╯\n");
        printf("      ││╭╮ ││││ │╰─╮\n");
        printf("      ││││ ││││ ╰─╮│\n");
        printf("      │╰╯│ │╰╯│ ╭─╯│\n");
        printf("      ╰──╯  ╰──╯  ╰──╯\n");
         printf("      Game Of Square:GOS ");
        color(yellow);
        printf("★");
        color(cyan);
        printf("▲");
        color(pink);
        printf("●");
        color(red);
        printf("■\n\n");
        color(white);
        printf("     ╭─────────────╮\n\n");
        printf("     │");color(yellow);printf("    ★[1.开始游戏]★      ");color(white);printf("┃\n\n");
        color(white);
        printf("     │");color(cyan);printf("    ▲[2.游戏帮助]▲      ");color(white);printf("┃\n\n");
        color(white);
        printf("     │");color(pink);printf("    ●[3.关于我们]●      ");color(white);printf("┃\n\n");
        color(white);
        printf("     │");color(red);printf("    ■[4.退出游戏]■      ");color(white);printf("┃\n\n");
        color(white);
        printf("     ╰━━━━━━━━━━━━━╯\n\n");
        xstime(NULL);
        if(kbhit()) {
            choi=getch();
            if(choi=='1') {
                stgame();
            }
            if(choi=='2') {
                help();
            }
            if(choi=='3') {
                about();
                getch();
                cls;
            }
            if(choi=='4') {
                cls;
                printf("确认退出吗?0否1是");
                choi2=getch();
                while(choi2!='0' && choi2!='1')choi2=getch();
                if(choi2=='1') {
                    jz();
                    Sleep(1000);
                    return;
                } else {
                    cls;
                }
            }
        }
    }
}
int main() {
    SetConsoleTitle("Game Of Square:GOS");
    system("mode con cols=42 lines=26");
    hidden();
    if(MessageBox(NULL,"本游戏需要获取本地资源,是否同意?","获取资源",MB_ICONEXCLAMATION|MB_OKCANCEL)==IDCANCEL) return 0;
    jz();
    printf("\nBingo!");
    Sleep(1000);
    home();
    STT=0;
    return 0;
}

  

枪战(人机)
#include<iostream>
#include<cstdio>
#include<cstdlib>
#include<cstring>
#include<windows.h>
#include<conio.h>
#include<time.h>
#define UP 72
#define DOWN 80
#define LEFT 75
#define RIGHT 77
using namespace std;
string a[21][20]= {"■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■",
                   "■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■",
                   "■","■","□","□","□","□","□","□","□","□","□","□","□","□","□","▓","▓","▲","■","■",
                   "■","□","□","□","■","■","□","■","□","■","■","■","■","■","■","▓","▓","▓","■","■",
                   "■","□","□","□","□","□","∷","□","□","■","∷","∷","∷","□","□","□","▓","▓","■","■",
                   "■","□","■","□","□","□","□","■","□","■","∷","∷","■","□","□","□","■","□","■","■",
                   "■","□","■","□","□","□","□","■","□","■","∷","■","□","□","□","□","■","□","■","■",
                   "■","□","□","∷","□","□","□","□","□","■","□","□","□","□","■","∷","■","□","■","■",
                   "■","□","■","□","■","■","□","□","■","■","□","□","□","■","∷","∷","■","□","■","■",
                   "■","□","□","□","□","□","□","■","□","□","□","□","□","∷","∷","∷","■","□","■","■",
                   "■","□","■","■","■","■","■","■","□","■","□","■","■","■","■","■","■","□","■","■",
                   "■","□","■","∷","∷","∷","□","□","□","□","□","■","□","□","□","□","□","□","■","■",
                   "■","□","■","∷","∷","■","□","□","□","■","■","□","□","■","■","□","■","□","■","■",
                   "■","□","■","∷","■","□","□","□","□","■","□","□","□","□","□","∷","□","□","■","■",
                   "■","□","■","□","□","□","□","■","∷","■","□","■","□","□","□","□","■","□","■","■",
                   "■","□","■","□","□","□","■","∷","∷","■","□","■","□","□","□","□","■","□","■","■",
                   "■","▓","▓","□","□","□","∷","∷","∷","■","□","□","∷","□","□","□","□","□","■","■",
                   "■","▓","▓","▓","■","■","■","■","■","■","□","■","□","■","■","□","□","□","■","■",
                   "■","●","▓","▓","□","□","□","□","□","□","□","□","□","□","□","□","□","■","■","■",
                   "■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■",
                   "■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■","■",
                  };        //地图
string jz[8];               //用来加载的变量
int xxxx,i,j,lev1=0,lev2=0; //一堆没用的变量=.=
int n1=1000,m1=10,l1=1;     //玩家1相关信息
int n2=1000,m2=10,l2=1;     //玩家2相关信息
int t,t1,t2,t3,t4;          //计算时间的变量
double t5,t6;               //计算时间的变量
int x=18,y=1;               //玩家1坐标
int p=2,q=17;               //玩家2坐标
int p2=2,q2=7;              //玩家2辅助坐标
char ch,ch1,ch2;            //输入字符,玩家1保留字符,玩家2保留字符
int gbdw1();                //光标定位1函数
int gbdw2();                //光标定位2函数
int gbdw3();                //光标定位3函数
int gbdw4();                //光标定位4函数
int hpzy();                 //获取资源函数
int jzz();                  //加载中函数
int p1kz();                 //玩家1控制函数
int p2kz();                 //玩家2控制函数
int zcd();                  //主菜单函数
void draw();                //画图函数
void hidden();              //隐藏光标函数
void zanting();             //暂停函数
void renji();               //人机模式
void renji_suiji();         //人机模式(防bug)
void renji_gress();         //吃草
void zanting() {
    system("cls");
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    cout<<"■■■■■■■■■■■■■■■■■■■"<<endl;
    return;
}
int gbdw1() {
    COORD pos = {0, 22};
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
int gbdw2() {
    COORD pos = {40, 22};
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
int gbdw3() {
    COORD pos = {0, 23};
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
int gbdw4() {
    COORD pos = {40, 23};
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
}
void draw() {
    if(n1>=1000) n1=1000;
    if(n2>=1000) n2=1000;
    if(n1<=0)    n1=0;
    if(n2<=0)    n2=0;
    if(m1>=500)  m1=500;
    if(m2>=500)  m2=500;
    if(m1<=0)    m1=0;
    if(m2<=0)    m2=0;
    if(l1>=20)   l1=20;
    if(l1>=20)   l1=20;
    COORD pos = {0, 0};
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
    cout<<"Already start "<<((int)time(NULL)-t)/60<<" minute for "<<((int)time(NULL)-t)%60<<" seconds"<<endl;
    for(i=1; i<=19; i++) {
        for(j=0; j<=18; j++) {
            if(a[i][j]=="■") {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_RED);
                cout<<a[i][j];
            }
            if(a[i][j]=="∷") {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_BLUE);
                cout<<a[i][j];
            }
            if(a[i][j]=="▓") {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
                cout<<a[i][j];
            }
            if(a[i][j]=="□") {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_GREEN);
                cout<<a[i][j];
            }
            if(a[i][j]=="●"||a[i][j]=="▲") {
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED|FOREGROUND_GREEN);
                cout<<a[i][j];
            }
        }
        cout<<endl;
    }
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
    printf("●player 1:                            ▲player 2:\n");
    printf("Lv:%2d  HP:%4d  mana:%3d             Lv:%2d  HP:%4d  mana:%3d\n",l1,n1,m1,l2,n2,m2);
    gbdw1();
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
    printf("HP:  ");
    for(j=1; j<=n1/10/8; j++)
        printf("█");
    xxxx=n1/10%8;
    cout<<jz[xxxx];
    printf("%d",n1);
    printf("          ");
    gbdw2();
    printf("HP:  ");
    for(j=1; j<=n2/10/8; j++)
        printf("█");
    xxxx=n2/10%8;
    cout<<jz[xxxx];
    printf("%d",n2);
    printf("          \n");
    gbdw3();
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_GREEN);
    printf("moon:");
    for(j=1; j<=m1/5/8; j++)
        printf("█");
    xxxx=m1/5%8;
    cout<<jz[xxxx];
    printf("%d",m1);
    printf("          ");
    gbdw4();
    printf("moon:");
    for(j=1; j<=m2/5/8; j++)
        printf("█");
    xxxx=m2/5%8;
    cout<<jz[xxxx];
    printf("%d",m2);
    printf("          \n");
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
    return;
}
int zcd() {
    while(1) {
        system("cls");
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
        system("cls");
        printf("Welcome to square in the world!\n");
        printf("-------------------------------\n");
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
        printf("S.[Start the game]\n");
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED | FOREGROUND_GREEN);
        printf("T.[The program diagram]\n");
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
        printf("H.[Help]\n");
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
        printf("Q.[Quit the game]\n");
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
        printf("-------------------------------\n");
        ch=getch();
        if(ch=='s'||ch=='S') {
            system("cls");
            for(i=1; i<=136; i++) {
                xxxx=i%8;
                COORD pos = {0, 0};
                SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
                printf("Being parsed~    Loading...\n");
                printf("----------------------------------\n");
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
                for(j=1; j<=i/8; j++)
                    printf("█");
                cout<<jz[xxxx]<<endl;
                SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
                printf("----------------------------------\n");
            }
            printf("Initialize the...");
            Sleep(1000);
            break;
        }
        if(ch=='t'||ch=='T') {
            COORD pos = {0, 0};
            SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
            printf("┏━━━━━━━━━━━━━━━━┓\n");
            printf("┃[square big showdown 4.11]      ┃\n");
            printf("┃[Human-machine version]         ┃\n");
            printf("┃┃                              ┃\n");
            printf("┃┣[Start the game]              ┃\n");
            printf("┃┃                              ┃\n");
            printf("┃┣[The program tree diagram]    ┃\n");
            printf("┃┃┃                            ┃\n");
            printf("┃┃┗[The current]               ┃\n");
            printf("┃┃                              ┃\n");
            printf("┃┣[Help]                        ┃\n");
            printf("┃┃┃                            ┃\n");
            printf("┃┃┣[Look at the map]           ┃\n");
            printf("┃┃┃                            ┃\n");
            printf("┃┃┣[Operation to help]         ┃\n");
            printf("┃┃┃                            ┃\n");
            printf("┃┃┗[The developer]             ┃\n");
            printf("┃┃                              ┃\n");
            printf("┃┗[Quit the game]               ┃\n");
            printf("┗━━━━━━━━━━━━━━━━┛\n");
            ch=getch();
        }
        if(ch=='h'||ch=='H') {
            system("cls");
            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
            printf("Do you need any help?\n");
            printf("---------------------\n");
            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED);
            printf("1.[Look at the map]\n");
            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_RED | FOREGROUND_GREEN);
            printf("2.[Operation to help]\n");
            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE);
            printf("3.[The developer]\n");
            SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
            printf("---------------------\n");
            ch=getch();
            if(ch=='1') {
                draw();
                printf("●player 1;\n");
                printf("▲Player 2;\n");
                printf("■Is a wall, do not walk;\n");
                printf("□Is a way, you can walk;\n");
                printf("∷The grass;\n");
                printf("▓Is the birth place of both parties.\n");
                printf("Two lines are at the bottom of the both sides of the case;\n");
                printf("            Press any key to return;\n");
                ch=getch();
                continue;
            }
            if(ch=='2') {
                system("cls");
                printf("player 1:\n");
                printf("   w.up      s.down     a.left    d.right\n");
                printf("   v.attack  b.Respond to health  n.vampire\n");
                printf("   f.flash   g.To attract\n");
                printf("-----------------------------------------------\n");
                printf("player 2:\n");
                printf("  ↑.up     ↓.down    ←.left   →.right\n");
                printf("   1.attack  2.Respond to health  3.crit\n");
                printf("   4.flash   5.Back to home\n");
                printf("-----------------------------------------------\n");
                printf("Click on the x for details!\n");
                ch=getch();
                if(ch=='x'||ch=='X') {
                    system("cls");
                    printf("player 1:---------------------------------\n");
                    printf("---control---          P1HP moon P2HP moon\n");
                    printf("   w.up                ----   +1 ---- ----\n");
                    printf("   s.down              ----   +1 ---- ----\n");
                    printf("   a.left              ----   +1 ---- ----\n");
                    printf("   d.right             ----   +1 ---- ----\n");
                    printf("   \n");
                    printf("   v.attack            ----   +2  -20 ----\n");
                    printf("   b.Respond to health +200  -50 ---- ----\n");
                    printf("   n.vampire           +150 -100 -150  -20\n");
                    printf("   f.flash             ----  -20 ---- ----\n");
                    printf("   g.To attract        ----  -70 -100 ----\n");
                    printf("player 2:---------------------------------\n");
                    printf("---control---          P1HP moon P2HP moon\n");
                    printf("  ↑.up                ---- ---- ----   +1\n");
                    printf("  ↓.down              ---- ---- ----   +1\n");
                    printf("  ←.left              ---- ---- ----   +1\n");
                    printf("  →.right             ---- ---- ----   +1\n");
                    printf("   \n");
                    printf("   1.attack             -20 ---- ----   +2\n");
                    printf("   2.Respond to health ---- ---- +200  -50\n");
                    printf("   3.crit              -200 ---- ---- -100\n");
                    printf("   4.flash             ---- ---- ----  -20\n");
                    printf("   5.Back to home      ---- ---- ----  -70\n");
                    printf("------------------------------------------");
                    ch=getch();
                }
                continue;
            }
            if(ch=='3') {
                system("cls");
                printf("The development team:\n");
                printf("  Alliance primary school\n");
                printf("Development date:\n");
                printf("  16/11/17 18:35\n");
                printf("Belonging to:\n");
                printf("  China's fujian province\n");
                ch=getch();
                continue;
            }
        }
        if(ch=='q'||ch=='Q') {
            if(1) {
                system("cls");
                printf("Really want to quit?\n");
                printf("--------------------\n");
                printf("Y.[Yes]    N.[No]\n");
                printf("--------------------\n");
                while(ch!='y'&&ch!='Y'&&ch!='N'&&ch!='n')
                    ch=getch();
            }
            if(ch=='Y'||ch=='y') {
                system("cls");
                for(i=1; i<=136; i++) {
                    xxxx=i%8;
                    COORD pos = {0, 0};
                    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
                    printf("Deleting records~    \n");
                    printf("----------------------------------\n");
                    for(j=1; j<=i/8; j++)
                        printf("█");
                    cout<<jz[xxxx]<<endl;
                    printf("----------------------------------\n");
                }
                printf("Delete the success.");
                Sleep(1000);
                exit(0);
            }
            if(ch=='N'||ch=='n')
                continue;
        }
    }
    return 0;
}
void hidden() {
    HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);
    CONSOLE_CURSOR_INFO cci;
    GetConsoleCursorInfo(hOut,&cci);
    cci.bVisible=0;
    SetConsoleCursorInfo(hOut,&cci);
    return;
}
int hqzy() {
    MessageBox(NULL,"The game need to get access to local resources \n agree?    (I am bored!)","Access to resources",MB_ICONEXCLAMATION|MB_OK);
    return 0;
}
int p1kz() {
    if(ch=='w'||ch=='s'||ch=='a'||ch=='d'
            ||ch=='W'||ch=='S'||ch=='A'||ch=='D')
        ch1=ch;
    if(ch=='a'||ch=='A') {
        if(x==2&&y==15||x==2&&y==16||x==2&&y==17
                ||x==3&&y==15||x==3&&y==16||x==3&&y==17
                ||x==4&&y==16||x==4&&y==17
                ||x==16&&y==1||x==16&&y==2
                ||x==17&&y==1||x==17&&y==2||x==17&&y==3
                ||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
            if(a[x][y-1]!="■"&&a[x][y-1]!="▲") {
                a[x][y]="▓";
                y--;
                a[x][y]="●";
                m1++;
                draw();
            }
        } else {
            if(a[x][y-1]!="■"&&a[x][y-1]!="▲") {
                a[x][y]="□";
                if(a[x][y-1]=="∷") {
                    srand((unsigned)time(NULL));
                    switch(rand()%2) {
                        case 0: {
                            n1+=50;
                        }
                        case 1: {
                            m1+=20;
                        }
                    }
                }
                y--;
                a[x][y]="●";
                m1++;
                draw();
            }
        }
    }
    if(ch=='d'||ch=='D') {
        if(x==2&&y==15||x==2&&y==16||x==2&&y==17
                ||x==3&&y==15||x==3&&y==16||x==3&&y==17
                ||x==4&&y==16||x==4&&y==17
                ||x==16&&y==1||x==16&&y==2
                ||x==17&&y==1||x==17&&y==2||x==17&&y==3
                ||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
            if(a[x][y+1]!="■"&&a[x][y+1]!="▲") {
                a[x][y]="▓";
                y++;
                a[x][y]="●";
                m1++;
                draw();
            }
        } else {
            if(a[x][y+1]!="■"&&a[x][y+1]!="▲") {
                a[x][y]="□";
                if(a[x][y+1]=="∷") {
                    srand((unsigned)time(NULL));
                    switch(rand()%2) {
                        case 0: {
                            n1+=50;
                        }
                        case 1: {
                            m1+=20;
                        }
                    }
                }
                y++;
                a[x][y]="●";
                m1++;
                draw();
            }
        }
    }
    if(ch=='w'||ch=='W') {
        if(x==2&&y==15||x==2&&y==16||x==2&&y==17
                ||x==3&&y==15||x==3&&y==16||x==3&&y==17
                ||x==4&&y==16||x==4&&y==17
                ||x==16&&y==1||x==16&&y==2
                ||x==17&&y==1||x==17&&y==2||x==17&&y==3
                ||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
            if(a[x-1][y]!="■"&&a[x-1][y]!="▲") {
                a[x][y]="▓";
                x--;
                a[x][y]="●";
                m1++;
                draw();
            }
        } else {
            if(a[x-1][y]!="■"&&a[x-1][y]!="▲") {
                a[x][y]="□";
                if(a[x-1][y]=="∷") {
                    srand((unsigned)time(NULL));
                    switch(rand()%2) {
                        case 0: {
                            n1+=50;
                        }
                        case 1: {
                            m1+=20;
                        }
                    }
                }
                x--;
                a[x][y]="●";
                m1++;
                draw();
            }
        }
    }
    if(ch=='s'||ch=='S') {
        if(x==2&&y==15||x==2&&y==16||x==2&&y==17
                ||x==3&&y==15||x==3&&y==16||x==3&&y==17
                ||x==4&&y==16||x==4&&y==17
                ||x==16&&y==1||x==16&&y==2
                ||x==17&&y==1||x==17&&y==2||x==17&&y==3
                ||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
            if(a[x+1][y]!="■"&&a[x+1][y]!="▲") {
                a[x][y]="▓";
                x++;
                a[x][y]="●";
                m1++;
                draw();
            }
        } else {
            if(a[x+1][y]!="■"&&a[x+1][y]!="▲") {
                a[x][y]="□";
                if(a[x+1][y]=="∷") {
                    srand((unsigned)time(NULL));
                    switch(rand()%2) {
                        case 0: {
                            n1+=50;
                        }
                        case 1: {
                            m1+=20;
                        }
                    }
                }
                x++;
                a[x][y]="●";
                m1++;
                draw();
            }
        }
    }
    if(ch=='v'||ch=='V') {
        if(a[x][y-2]=="▲"
                ||a[x][y+2]=="▲"
                ||a[x-2][y]=="▲"
                ||a[x+2][y]=="▲"
                ||a[x-1][y-1]=="▲"
                ||a[x+1][y-1]=="▲"
                ||a[x-1][y+1]=="▲"
                ||a[x+1][y+1]=="▲"
                ||a[x][y-1]=="▲"
                ||a[x][y+1]=="▲"
                ||a[x-1][y]=="▲"
                ||a[x+1][y]=="▲") {
            n2-=20;
            m1+=2;
            n2-=(l1-1)*2;
            if(lev1==l1) {
                lev1=0;
                l1++;
            }
            lev1++;
            draw();
        }
    }
    if(ch=='b'||ch=='B') {
        if(m1>=50) {
            n1+=200;
            m1-=50;
            draw();
        }
    }
    if(ch=='n'||ch=='N') {
        if(m1>=100) {
            n2-=150;
            n1+=150;
            m1-=100;
            n2-=(l1-1)*10;
            n1+=(l1-1)*10;
            m1+=20;
            m2-=20;
            if(lev1==l1) {
                lev1=0;
                l1++;
            }
            lev1++;
            draw();
        }
    }
    if(ch=='f'||ch=='F') {
        if(m1>=20) {
            if(ch1=='w'||ch1=='W') {
                if(x==2&&y==15||x==2&&y==16||x==2&&y==17
                        ||x==3&&y==15||x==3&&y==16||x==3&&y==17
                        ||x==4&&y==16||x==4&&y==17
                        ||x==16&&y==1||x==16&&y==2
                        ||x==17&&y==1||x==17&&y==2||x==17&&y==3
                        ||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
                    if(a[x-2][y]=="▓"||a[x-2][y]=="□") {
                        a[x][y]="▓";
                        x-=2;
                        a[x][y]="●";
                        m1-=20;
                        draw();
                    }
                } else {
                    if(a[x-2][y]=="▓"||a[x-2][y]=="□"||a[x-2][y]=="∷") {
                        a[x][y]="□";
                        if(a[x-2][y]=="∷") {
                            srand((unsigned)time(NULL));
                            switch(rand()%2) {
                                case 0: {
                                    n1+=50;
                                    m1+=30;
                                }
                                case 1: {
                                    m1+=30;
                                }
                            }
                        }
                        x-=2;
                        a[x][y]="●";
                        m1-=20;
                        draw();
                    }
                }
            }
            if(ch1=='s'||ch1=='S') {
                if(x==2&&y==15||x==2&&y==16||x==2&&y==17
                        ||x==3&&y==15||x==3&&y==16||x==3&&y==17
                        ||x==4&&y==16||x==4&&y==17
                        ||x==16&&y==1||x==16&&y==2
                        ||x==17&&y==1||x==17&&y==2||x==17&&y==3
                        ||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
                    if(a[x+2][y]=="▓"||a[x+2][y]=="□") {
                        a[x][y]="▓";
                        x+=2;
                        a[x][y]="●";
                        m1-=20;
                        draw();
                    }
                } else {
                    if(a[x+2][y]=="▓"||a[x+2][y]=="□"||a[x+2][y]=="∷") {
                        a[x][y]="□";
                        if(a[x+2][y]=="∷") {
                            srand((unsigned)time(NULL));
                            switch(rand()%2) {
                                case 0: {
                                    n1+=50;
                                    m1+=30;
                                }
                                case 1: {
                                    m1+=30;
                                }
                            }
                        }
                        x+=2;
                        a[x][y]="●";
                        m1-=20;
                        draw();
                    }
                }
            }
            if(ch1=='a'||ch1=='A') {
                if(x==2&&y==15||x==2&&y==16||x==2&&y==17
                        ||x==3&&y==15||x==3&&y==16||x==3&&y==17
                        ||x==4&&y==16||x==4&&y==17
                        ||x==16&&y==1||x==16&&y==2
                        ||x==17&&y==1||x==17&&y==2||x==17&&y==3
                        ||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
                    if(a[x][y-2]=="▓"||a[x][y-2]=="□") {
                        a[x][y]="▓";
                        y-=2;
                        a[x][y]="●";
                        m1-=20;
                        draw();
                    }
                } else {
                    if(a[x][y-2]=="▓"||a[x][y-2]=="□"||a[x][y-2]=="∷") {
                        a[x][y]="□";
                        if(a[x][y-2]=="∷") {
                            srand((unsigned)time(NULL));
                            switch(rand()%2) {
                                case 0: {
                                    n1+=50;
                                    m1+=30;
                                }
                                case 1: {
                                    m1+=30;
                                }
                            }
                        }
                        y-=2;
                        a[x][y]="●";
                        m1-=20;
                        draw();
                    }
                }
            }
            if(ch1=='d'||ch1=='D') {
                if(x==2&&y==15||x==2&&y==16||x==2&&y==17
                        ||x==3&&y==15||x==3&&y==16||x==3&&y==17
                        ||x==4&&y==16||x==4&&y==17
                        ||x==16&&y==1||x==16&&y==2
                        ||x==17&&y==1||x==17&&y==2||x==17&&y==3
                        ||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
                    if(a[x][y+2]=="▓"||a[x][y+2]=="□") {
                        a[x][y]="▓";
                        y+=2;
                        a[x][y]="●";
                        m1-=20;
                        draw();
                    }
                } else {
                    if(a[x][y+2]=="▓"||a[x][y+2]=="□"||a[x][y+2]=="∷") {
                        a[x][y]="□";
                        if(a[x][y+2]=="∷") {
                            srand((unsigned)time(NULL));
                            switch(rand()%2) {
                                case 0: {
                                    n1+=50;
                                    m1+=30;
                                }
                                case 1: {
                                    m1+=30;
                                }
                            }
                        }
                        y+=2;
                        a[x][y]="●";
                        m1-=20;
                        draw();
                    }
                }
            }
        }
    }
    if(ch=='g'||ch=='G') {
        if(m1>=70) {
            if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                    ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                    ||p==4&&q==16||p==4&&q==17
                    ||p==16&&q==1||p==16&&q==2
                    ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                    ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
                if(a[x+1][y]!="■") {
                    a[p][q]="▓";
                    p=x+1;
                    q=y;
                    a[p][q]="▲";
                    m1-=70;
                    n2-=100;
                    return 0;
                }
                if(a[x-1][y]!="■") {
                    a[p][q]="▓";
                    p=x-1;
                    q=y;
                    a[p][q]="▲";
                    m1-=70;
                    n2-=100;
                    return 0;
                }
                if(a[x][y+1]!="■") {
                    a[p][q]="▓";
                    p=x;
                    q=y+1;
                    a[p][q]="▲";
                    m1-=70;
                    n2-=100;
                    return 0;
                }
                if(a[x][y-1]!="■") {
                    a[p][q]="▓";
                    p=x;
                    q=y-1;
                    a[p][q]="▲";
                    m1-=70;
                    n2-=100;
                    return 0;
                }
            } else {
                 if(a[x+1][y]!="■") {
                    a[p][q]="□";
                    p=x+1;
                    q=y;
                    a[p][q]="▲";
                    m1-=70;
                    n2-=100;
                    return 0;
                }
                if(a[x-1][y]!="■") {
                    a[p][q]="□";
                    p=x-1;
                    q=y;
                    a[p][q]="▲";
                    m1-=70;
                    n2-=100;
                    return 0;
                }
                if(a[x][y+1]!="■") {
                    a[p][q]="□";
                    p=x;
                    q=y+1;
                    a[p][q]="▲";
                    m1-=70;
                    n2-=100;
                    return 0;
                }
                if(a[x][y-1]!="■") {
                    a[p][q]="□";
                    p=x;
                    q=y-1;
                    a[p][q]="▲";
                    m1-=70;
                    n2-=100;
                    return 0;
                }
            }
        }
    }
    return 0;
}
int p2kz() {
    if(ch==72||ch==80||ch==75||ch==77)
        ch2=ch;
    if(ch==72) {
        if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                ||p==4&&q==16||p==4&&q==17
                ||p==16&&q==1||p==16&&q==2
                ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
            if(a[p-1][q]!="■"&&a[p-1][q]!="●") {
                a[p][q]="▓";
                p--;
                a[p][q]="▲";
                m2++;
                draw();
            }
        } else {
            if(a[p-1][q]!="■"&&a[p-1][q]!="●") {
                a[p][q]="□";
                if(a[p-1][q]=="∷") {
                    srand((unsigned)time(NULL));
                    switch(rand()%2) {
                        case 0: {
                            n2+=50;
                        }
                        case 1: {
                            m2+=20;
                        }
                    }
                }
                p--;
                a[p][q]="▲";
                m2++;
                draw();
            }
        }
    }
    if(ch==75) {
        if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                ||p==4&&q==16||p==4&&q==17
                ||p==16&&q==1||p==16&&q==2
                ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
            if(a[p][q-1]!="■"&&a[p][q-1]!="●") {
                a[p][q]="▓";
                q--;
                a[p][q]="▲";
                m2++;
                draw();
            }
        } else {
            if(a[p][q-1]!="■"&&a[p][q-1]!="●") {
                a[p][q]="□";
                if(a[p][q-1]=="∷") {
                    srand((unsigned)time(NULL));
                    switch(rand()%2) {
                        case 0: {
                            n2+=50;
                        }
                        case 1: {
                            m2+=20;
                        }
                    }
                }
                q--;
                a[p][q]="▲";
                m2++;
                draw();
            }
        }
    }
    if(ch==80) {
        if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                ||p==4&&q==16||p==4&&q==17
                ||p==16&&q==1||p==16&&q==2
                ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
            if(a[p+1][q]!="■"&&a[p+1][q]!="●") {
                a[p][q]="▓";
                p++;
                a[p][q]="▲";
                m2++;
                draw();
            }
        } else {
            if(a[p+1][q]!="■"&&a[p+1][q]!="●") {
                a[p][q]="□";
                if(a[p+1][q]=="∷") {
                    srand((unsigned)time(NULL));
                    switch(rand()%2) {
                        case 0: {
                            n2+=50;
                        }
                        case 1: {
                            m2+=20;
                        }
                    }
                }
                p++;
                a[p][q]="▲";
                m2++;
                draw();
            }
        }
    }
    if(ch==77) {
        if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                ||p==4&&q==16||p==4&&q==17
                ||p==16&&q==1||p==16&&q==2
                ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
            if(a[p][q+1]!="■"&&a[p][q+1]!="●") {
                a[p][q]="▓";
                q++;
                a[p][q]="▲";
                m2++;
                draw();
            }
        } else {
            if(a[p][q+1]!="■"&&a[p][q+1]!="●") {
                a[p][q]="□";
                if(a[p][q+1]=="∷") {
                    srand((unsigned)time(NULL));
                    switch(rand()%2) {
                        case 0: {
                            n2+=50;
                        }
                        case 1: {
                            m2+=20;
                        }
                    }
                }
                q++;
                a[p][q]="▲";
                m2++;
                draw();
            }
        }
    }
    if(ch=='1') {
        if(a[p][q-1]=="●"
                ||a[p][q+1]=="●"
                ||a[p-1][q]=="●"
                ||a[p+1][q]=="●") {
            n1-=20;
            m2+=2;
            n1-=(l2-1)*2;
            if(lev2==l2) {
                lev2=0;
                l2++;
            }
            lev2++;
            draw();
        }
    }
    if(ch=='2') {
        if(m2>=50) {
            n2+=200;
            m2-=50;
            draw();
        }
    }
    if(ch=='3') {
        if(m2>=100) {
            n1-=200;
            m2-=100;
            n1-=(l2-1)*20;
            if(lev2==l2) {
                lev2=0;
                l2++;
            }
            lev2++;
            draw();
        }
    }
    if(ch=='4') {
        if(m2>=20) {
            if(ch2==72) {
                if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                        ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                        ||p==4&&q==16||p==4&&q==17
                        ||p==16&&q==1||p==16&&q==2
                        ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                        ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
                    if(a[p-2][q]=="▓"||a[p-2][q]=="□") {
                        a[p][q]="▓";
                        p-=2;
                        a[p][q]="▲";
                        m1++;
                         m2-=20;
                        draw();
                    }
                } else {
                    if(a[p-2][q]=="▓"||a[p-2][q]=="□"||a[p-2][q]=="∷") {
                        a[p][q]="□";
                        if(a[p-2][q]=="∷") {
                            srand((unsigned)time(NULL));
                            switch(rand()%2) {
                                case 0: {
                                    n2+=50;
                                    m2+=30;
                                }
                                case 1: {
                                    m2+=30;
                                }
                            }
                        }
                        p-=2;
                        a[p][q]="▲";
                        m1++;
                         m2-=20;
                        draw();
                    }
                }
            }
            if(ch2==80) {
                if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                        ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                        ||p==4&&q==16||p==4&&q==17
                        ||p==16&&q==1||p==16&&q==2
                        ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                        ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
                    if(a[p+2][q]=="▓"||a[p+2][q]=="□") {
                        a[p][q]="▓";
                        p+=2;
                        a[p][q]="▲";
                        m1++;
                         m2-=20;
                        draw();
                    }
                } else {
                    if(a[p+2][q]=="▓"||a[p+2][q]=="□"||a[p+2][q]=="∷") {
                        a[p][q]="□";
                        if(a[p+2][q]=="∷") {
                            srand((unsigned)time(NULL));
                            switch(rand()%2) {
                                case 0: {
                                    n2+=50;
                                    m2+=30;
                                }
                                case 1: {
                                    m2+=30;
                                }
                            }
                        }
                        p+=2;
                        a[p][q]="▲";
                        m1++;
                         m2-=20;
                        draw();
                    }
                }
            }
            if(ch2==75) {
                if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                        ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                        ||p==4&&q==16||p==4&&q==17
                        ||p==16&&q==1||p==16&&q==2
                        ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                        ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
                    if(a[p][q-2]=="▓"||a[p][q-2]=="□") {
                        a[p][q]="▓";
                        q-=2;
                        a[p][q]="▲";
                        m1++;
                         m2-=20;
                        draw();
                    }
                } else {
                    if(a[p][q-2]=="▓"||a[p][q-2]=="□"||a[p][q-2]=="∷") {
                        a[p][q]="□";
                        if(a[p][q-2]=="∷") {
                            srand((unsigned)time(NULL));
                            switch(rand()%2) {
                                case 0: {
                                    n2+=50;
                                    m2+=30;
                                }
                                case 1: {
                                    m2+=30;
                                }
                            }
                        }
                        q-=2;
                        a[p][q]="▲";
                        m1++;
                         m2-=20;
                        draw();
                    }
                }
            }
            if(ch2==77) {
                if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                        ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                        ||p==4&&q==16||p==4&&q==17
                        ||p==16&&q==1||p==16&&q==2
                        ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                        ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
                    if(a[p][q+2]=="▓"||a[p][q+2]=="□") {
                        a[p][q]="▓";
                        q+=2;
                        a[p][q]="▲";
                        m1++;
                         m2-=20;
                        draw();
                    }
                } else {
                    if(a[p][q+2]=="▓"||a[p][q+2]=="□"||a[p][q+2]=="∷") {
                        a[p][q]="□";
                        if(a[p][q+2]=="∷") {
                            srand((unsigned)time(NULL));
                            switch(rand()%2) {
                                case 0: {
                                    n2+=50;
                                    m2+=30;
                                }
                                case 1: {
                                    m2+=30;
                                }
                            }
                        }
                        q+=2;
                        a[p][q]="▲";
                        m1++;
                         m2-=20;
                        draw();
                    }
                }
            }
        }
    }
    if(ch=='5') {
        if(m2>=70) {
            if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                    ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                    ||p==4&&q==16||p==4&&q==17
                    ||p==16&&q==1||p==16&&q==2
                    ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                    ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
                a[p][q]="▓";
                p=2;
                q=17;
                a[p][q]="▲";
                m2-=70;
                draw();
            } else {
                a[p][q]="□";
                p=2;
                q=17;
                a[p][q]="▲";
                m2-=70;
                draw();
            }
        }
    }
    return 0;
}
void renji() {
    if(n2<=200) {
        if(!(p==2&&q==15||p==2&&q==16||p==2&&q==17
                ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                ||p==4&&q==16||p==4&&q==17)) {
            if(m2>=70) {
                ch='5';
                p2kz();
                return;
            }
        } else {
            return;
        }
    }
    if(a[p][q-1]=="●"
            ||a[p][q+1]=="●"
            ||a[p-1][q]=="●"
            ||a[p+1][q]=="●") {
        ch='1';
        p2kz();
        return;
    }
    if(n2<=900) {
        if(m2>=50) {
            ch='2';
            p2kz();
            return;
        }
    }
    if(n2>=600) {
        if(m2>=100) {
            ch='3';
            p2kz();
            return;
        }
    }
    renji_gress();
    if(x<p) {
        if(a[p-1][q]=="■") {
            if(m2>=20) {
                ch2=UP;
                ch='4';
            }
        } else {
            ch=UP;
        }
        p2kz();
        if(p!=p2||q!=q2) {
            p2=p;
            q2=q;
            return;
        } else {
            renji_suiji();
            return;
        }
    }
    if(x>p) {
        if(a[p+1][q]=="■") {
            if(m2>=20) {
                ch2=DOWN;
                ch='4';
            }
        } else {
            ch=DOWN;
        }
        p2kz();
        if(p!=p2||q!=q2) {
            p2=p;
            q2=q;
            return;
        } else {
            renji_suiji();
            return;
        }
    }
    if(y<q) {
        if(a[p][q-1]=="■") {
            if(m2>=20) {
                ch2=LEFT;
                ch='4';
            }
        } else {
            ch=LEFT;
        }
        p2kz();
        if(p!=p2||q!=q2) {
            p2=p;
            q2=q;
            return;
        } else {
            renji_suiji();
            return;
        }
    }
    if(y>q) {
        if(a[p][q+1]=="■") {
            if(m2>=20) {
                ch2=RIGHT;
                ch='4';
            }
        } else {
            ch=RIGHT;
        }
        p2kz();
        if(p!=p2||q!=q2) {
            p2=p;
            q2=q;
            return;
        } else {
            renji_suiji();
            return;
        }
    }
    return;
}
void renji_suiji() {
    srand((unsigned)time(NULL));
    switch(rand()%4) {
        case 0: {
            ch=UP;
            p2kz();
            p2kz();
            break;
        }
        case 1: {
            ch=DOWN;
            p2kz();
            p2kz();
            break;
        }
        case 2: {
            ch=LEFT;
            p2kz();
            p2kz();
            break;
        }
        case 3: {
            ch=RIGHT;
            p2kz();
            p2kz();
            break;
        }
    }
}
void renji_gress() {
    if(a[p-2][q]=="∷") {
        if(a[p-1][q]=="■") {
            if(m2>=30) {
                ch2=UP;
                ch='4';
                p2kz();
                return;
            }
        }
    }
    if(a[p+2][q]=="∷") {
        if(a[p+1][q]=="■") {
            if(m2>=30) {
                ch2=DOWN;
                ch='4';
                p2kz();
                return;
            }
        }
    }
    if(a[p][q-2]=="∷") {
        if(a[p][q-1]=="■") {
            if(m2>=30) {
                ch2=LEFT;
                ch='4';
                p2kz();
                return;
            }
        }
    }
    if(a[p][q+2]=="∷") {
        if(a[p][q+1]=="■") {
            if(m2>=30) {
                ch2=RIGHT;
                ch='4';
                p2kz();
                return;
            }
        }
    }
    if(a[p-1][q]=="∷") {
        ch=UP;
        p2kz();
        return;
    }
    if(a[p+1][q]=="∷") {
        ch=DOWN;
        p2kz();
        return;
    }
    if(a[p][q-1]=="∷") {
        ch=LEFT;
        p2kz();
        return;
    }
    if(a[p][q+1]=="∷") {
        ch=RIGHT;
        p2kz();
        return;
    }
}
int main() {
    if(1) {
        hidden();
        jz[1]="▏";
        jz[2]="▎";
        jz[3]="▍";
        jz[4]="▌";
        jz[5]="▋";
        jz[6]="▊";
        jz[7]="▉";
        jz[0]="";
    }
    hqzy();
    for(i=1; i<=136; i++) {
        xxxx=i%8;
        COORD pos = {0, 0};
        SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE), pos);
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
        printf("Are entering a square in the world~    Loading...\n");
        printf("-------------------------------------------------\n");
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_GREEN);
        for(j=1; j<=i/8; j++)
            printf("█");
        cout<<jz[xxxx]<<endl;
        SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),FOREGROUND_INTENSITY|FOREGROUND_BLUE|FOREGROUND_RED|FOREGROUND_GREEN);
        printf("----------------------------------\n");
    }
////////////////////////////////////////////////////////////////////////////////////
    printf("Initialize the...");
    Sleep(1000);
    while(1) {
        n1=1000;
        m1=10;
        n2=1000;
        m2=10;
        l1=1;
        l2=1;
        lev1=0;
        lev2=0;
        zcd();
        if(x==2&&y==15||x==2&&y==16||x==2&&y==17
                ||x==3&&y==15||x==3&&y==16||x==3&&y==17
                ||x==4&&y==16||x==4&&y==17
                ||x==16&&y==1||x==16&&y==2
                ||x==17&&y==1||x==17&&y==2||x==17&&y==3
                ||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
            a[x][y]="▓";
        } else {
            a[x][y]="□";
        }
        if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                ||p==4&&q==16||p==4&&q==17
                ||p==16&&q==1||p==16&&q==2
                ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
            a[p][q]="▓";
        } else {
            a[p][q]="□";
        }
        x=18;
        y=1;
        p=2;
        q=17;
        a[4][6]=a[4][10]=a[4][11]=a[4][12]=a[5][10]=a[5][11]=a[6][10]=a[7][3]=a[7][15]=a[8][14]=a[8][15]=a[9][13]=a[9][14]=a[9][15]=a[13][3]=a[12][3]=a[12][4]=a[11][3]=a[11][4]=a[11][5]=a[14][8]=a[15][7]=a[15][8]=a[16][6]=a[16][7]=a[16][8]=a[16][12]=a[13][15]="∷";
        a[x][y]="●";
        a[p][q]="▲";
        t=time(NULL);             //开始时间
        t1=(int)time(NULL);       //当前时间
        t2=(int)time(NULL)-t;     //扣血时间
        t3=(int)time(NULL)-t;     //当前时间-开始时间:1 or 0
        t5=(double)time(NULL);    //
        draw();
        while(n1>0&&n2>0) {
            t1=(int)time(NULL);
            t3=(int)time(NULL)-t;
            t6=(double)time(NULL)-t5;
            if((time(NULL)-t)/60==10) {
                draw();
                printf("            Game over");
                while(1) {
                    ch=getch();
                    if(ch=='=') {
                        return 0;
                    }
                }
            }
            if(t2!=(int)time(NULL)-t) {
                draw();
                t2=(int)time(NULL)-t;
                if(x==2&&y==15||x==2&&y==16||x==2&&y==17
                        ||x==3&&y==15||x==3&&y==16||x==3&&y==17
                        ||x==4&&y==16||x==4&&y==17) {
                    n1-=50;
                }
                if(x==16&&y==1||x==16&&y==2
                        ||x==17&&y==1||x==17&&y==2||x==17&&y==3
                        ||x==18&&y==1||x==18&&y==2||x==18&&y==3) {
                    n1+=50;
                }
                if(p==2&&q==15||p==2&&q==16||p==2&&q==17
                        ||p==3&&q==15||p==3&&q==16||p==3&&q==17
                        ||p==4&&q==16||p==4&&q==17) {
                    n2+=50;
                }
                if(p==16&&q==1||p==16&&q==2
                        ||p==17&&q==1||p==17&&q==2||p==17&&q==3
                        ||p==18&&q==1||p==18&&q==2||p==18&&q==3) {
                    n2-=50;
                }
            }
            if(t3%60==0) {
                srand((unsigned)time(NULL));
                switch(rand()%28) {
                    case 0:
                        if(a[4][6]=="□")a[4][6]="∷";
                    case 1:
                        if(a[4][10]=="□")a[4][10]="∷";
                    case 2:
                        if(a[4][11]=="□")a[4][11]="∷";
                    case 3:
                        if(a[4][12]=="□")a[4][12]="∷";
                    case 4:
                        if(a[5][10]=="□")a[5][10]="∷";
                    case 5:
                        if(a[5][11]=="□")a[5][11]="∷";
                    case 6:
                        if(a[6][10]=="□")a[6][10]="∷";
                    case 7:
                        if(a[7][3]=="□")a[7][3]="∷";
                    case 8:
                        if(a[7][15]=="□")a[7][15]="∷";
                    case 9:
                        if(a[8][14]=="□")a[8][14]="∷";
                    case 10:
                        if(a[8][15]=="□")a[8][15]="∷";
                    case 11:
                        if(a[9][13]=="□")a[9][13]="∷";
                    case 12:
                        if(a[9][14]=="□")a[9][14]="∷";
                    case 13:
                        if(a[9][15]=="□")a[9][15]="∷";
                    case 14:
                        if(a[13][3]=="□")a[13][3]="∷";
                    case 15:
                        if(a[12][3]=="□")a[12][3]="∷";
                    case 16:
                        if(a[12][4]=="□")a[12][4]="∷";
                    case 17:
                        if(a[11][3]=="□")a[11][3]="∷";
                    case 18:
                        if(a[11][4]=="□")a[11][4]="∷";
                    case 19:
                        if(a[11][5]=="□")a[11][5]="∷";
                    case 20:
                        if(a[14][8]=="□")a[14][8]="∷";
                    case 21:
                        if(a[15][7]=="□")a[15][7]="∷";
                    case 22:
                        if(a[15][8]=="□")a[15][8]="∷";
                    case 23:
                        if(a[16][6]=="□")a[16][6]="∷";
                    case 24:
                        if(a[16][7]=="□")a[16][7]="∷";
                    case 25:
                        if(a[16][8]=="□")a[16][8]="∷";
                    case 26:
                        if(a[16][12]=="□")a[16][12]="∷";
                    case 27:
                        if(a[13][15]=="□")a[13][15]="∷";
                }
                draw();
            }
            if(t6>=0.125) {//速度调节
                renji();
                t5+=0.125;
            }
            if(kbhit()) {
                ch=getch();
                p1kz();
                ////////////////////////////////////////////////////////////////////////////////////
                if(ch=='p') {
                    zanting();
                    t4=t1;
                    do {
                        ch=getch();
                    } while(ch!='p');
                    t=t+(int)time(NULL)-t4;
                    system("cls");
                    draw();
                    continue;
                }
                if(ch=='=') {
                    exit(0);
                }
                if(ch=='q') {
                    m1++;
                    draw();
                }
                if(ch=='6') {
                    m2++;
                    draw();
                }
            }
        }
        ////////////////////////////////////////////////////////////////////////////////////
        draw();
        if(n2==0) {
            printf("        ●Player 1 -");
            while(1) {
                ch=getch();
                if(ch=='=') {
                    break;
                }
            }
        } else {
            printf("        ▲Player 2 -");
            while(1) {
                ch=getch();
                if(ch=='=') {
                    break;
                }
            }
        }
    }
    return 0;
}

  

双人格斗(人机)
//有损坏嫌疑
#include<windows.h>
#include<iostream>
#include<conio.h>
#include<cstring>
#include<cstdio>
#include<ctime>
using namespace std;
string name= "Slime"; 
char c,p;
string jn1="扔石头",jn2="  无  ", jn3="  无  ";
int HP1=100,HP2=10,hp1=100,hp2=10,exp=0,jnn1,jnn2,jnn3,matk=1;
char atk1[]=" 5  ",atk2[]=" 0  ",atk3[]=" 0  "; 
char map[100][100]={
    "[1--1] [lock] [lock]\n",
    "[lock] [lock] [lock]\n",
    "[lock] [lock] [lock]\n",
    "[lock] [lock] [lock]\n",
    "[lock] [lock] [lock]\n"
};
string jnkk[100]={
    "扔石头","  无  ","  无  ","  无  ","  无  ",
    "  无  ","  无  ","  无  ","  无  ","  无  ",
    "  无  ","  无  ","  无  ","  无  ","  无  "
};
int jnkkk[100];
 void jnk()
{
    system("cls");
    cout<<"\n\n\n\n\n\n                  技能:\n                      ";
    for(int k=1;k<16;k++)
    {
        cout<<k<<'.'<<jnkk[k-1]<<' ';
        if(k%5==0)
            cout<<"\n                      ";
    }
    cout<<"chose what you want(three number):";
    cin>>jnn1>>jnn2>>jnn3;
    jn1=jnkk[jnn1-1];
    atk1[1]=(char)(jnkkk[jnn1-1]);
    jn2=jnkk[jnn2-1];
    atk2[1]=(char)(jnkkk[jnn2-1]);
    jn3=jnkk[jnn3-1];
    atk3[1]=(char)(jnkkk[jnn3-1]);
    system("cls");
}
 void battle(int x,int y,string s)
{
    cout<<"You";
    for(int i=0;i<y-4;i++)
        cout<<"  ";
    cout<<s<<endl;
    cout<<"HP:"<<HP1;
    for(int i=0;i<y-7;i++)
        cout<<"  ";
    cout<<"HP:"<<HP2<<endl;
    cout<<HP1-hp1;
    for(int i=0;i<y-4;i++)
        cout<<"  ";
    cout<<HP2-hp2<<endl;
    hp1=HP1;
    hp2=HP2;
    for(int i=0;i<x;i++)
    {
        for(int j=0;j<y;j++)
        {
            if(i>x/2-1&&i<x/2+1&&j<y/4+1&&j>y/4-1)
                cout<<"[]"; 
            else
            {
                if(i>x/2-1&&i<x/2+1&&j<y/4*3+1&&j>y/4*3-1)
                    cout<<"()"; 
                else
                    cout<<"--";
            }
        }
        cout<<endl;
    }
    cout<<"技能:"<<endl;
    cout<<"     | ====== |"<<"   "<<"| ====== |"<<"   "<<"| ====== |";
    cout<<endl;
    cout<<"     |Q:"<<jn1<<"|"<<"   |E:"<<jn2<<"|"<<"   |T:"<<jn3<<"|";
    cout<<endl;
    cout<<"     |atk:"<<atk1<<"|"<<"   |atk:"<<atk2<<"|"<<"   |atk:"<<atk3<<"|";
    cout<<endl;
    cout<<"     | ====== |"<<"   "<<"| ====== |"<<"   "<<"| ====== |";
    cout<<endl;
    Sleep(600);
    system("cls");
    cout<<"You";
    for(int i=0;i<y-4;i++)
        cout<<"  ";
    cout<<s<<endl;
    cout<<"HP:"<<HP1;
    for(int i=0;i<y-7;i++)
        cout<<"  ";
    cout<<"HP:"<<HP2<<endl;
    cout<<endl;
    for(int i=0;i<x;i++)
    {
        for(int j=0;j<y;j++)
        {
            if(i>x/2-1&&i<x/2+1&&j<y/4+1&&j>y/4-1)
                cout<<"[]"; 
            else
            {
                if(i>x/2-1&&i<x/2+1&&j<y/4*3+1&&j>y/4*3-1)
                    cout<<"()"; 
                else
                    cout<<"--";
            }
        }
        cout<<endl;
    }
    cout<<"技能:"<<endl;
    cout<<"     | ====== |"<<"   "<<"| ====== |"<<"   "<<"| ====== |";
    cout<<endl;
    cout<<"     |Q:"<<jn1<<"|"<<"   |E:"<<jn2<<"|"<<"   |T:"<<jn3<<"|";
    cout<<endl;
    cout<<"     |atk:"<<atk1<<"|"<<"   |atk:"<<atk2<<"|"<<"   |atk:"<<atk3<<"|";
    cout<<endl;
    cout<<"     | ====== |"<<"   "<<"| ====== |"<<"   "<<"| ====== |";
    cout<<endl;
     return;
}
 void begin()
{
    while(HP1>0&&HP2>0)
    {
        battle(8,20,name);
        cout<<"按q:";
        c=getch();
        if(c=='q'||c=='Q')
        {
            HP2-=5;
            HP1-=1;
        }
        else
            HP1-=1;
        system("cls");
    }
     return;
}
 void dead()
{
    system("cls");
    cout<<"\n\n\n\n\n\n\n\n\n                      YOU DEAD!";
    Sleep(3000);
    system("cls");
}
 void win()
{
    system("cls");
    cout<<"\n\n\n\n\n\n\n\n\n                      YOU KILL "<<name<<'!';
    Sleep(3000);
    system("cls");
     return; 
}
 void place(char c,char p)
{
    Sleep(1000);
    if(c==1&&p==1)
    {
         name="Zombie"; 
        matk=5;
        HP1=100;
        HP2=50;
        jnk();
        while(HP1>0)
        {
            battle(8,20,name);
            c=getch();
            if(c=='q'||c=='Q')
            {
                HP2-=atk1[1];
                HP1-=matk;
            }
            else if(c=='e'||c=='E')
            {
                HP2-=atk2[1];
                HP1-=matk;
            }
            else if(c=='t'||c=='T')
            {
                HP2-=atk3[1];
                HP1-=matk;
            }
            else
                HP1-=matk;
            if(HP2<=0)
            {
                win();
                for(int i=exp+30;exp<i;exp++) 
                {
                    cout<<"\n\n\n\n\n\n\n\n\n                      exp:"<<exp<<"+1";
                    Sleep(100);
                    system("cls"); 
                }
                map[0][8]='1',map[0][9]='-',map[0][10]='-',map[0][11]='2';
                return;
            }
        system("cls");
        }
    }
     return;
}
 void chosemap()
{
    system("cls");
    cout<<"\n\n\n\n\n\n                      ";
    cout<<map[0];
    cout<<"                      ";
    cout<<map[1];
    cout<<"                      ";
    cout<<map[2];
    cout<<"                      ";
    cout<<map[3];
    cout<<"                      ";
    cout<<map[4];
    cout<<"                      ";
    cout<<"你要去哪:";
    c=getch();
    system("cls");
    cout<<"\n\n\n\n\n\n\n\n\n                      ";
    cout<<map[c-49];
    cout<<"                      ";
    cout<<"你要去哪:";
    p=getch();
    if(map[c-49][p*7-3]==p)
        place(c,p);
    else
    {
        cout<<"\n\n\n\n\n\n\n\n\n                      lock";
        Sleep(4000);
        chosemap();
    }
     system("cls");
 }
 int main()
{
    memset(jnkkk,0,sizeof(jnkkk));
    jnkkk[0]=5;
    cout<<"\n\n\n\n\n\n\n\n\n                      为了更好的游戏体验,你该打完教程。";
    Sleep(2500);
    system("cls");
    while(1)
    {
        begin();
        if(HP2<=0)
            break;
        system("cls");
        dead();
        cout<<"\n\n\n\n\n\n\n\n\n                      居然教程还有人过不去。。。渣渣"; 
        HP1=100;
        HP2=10;
        Sleep(2000);
        system("cls"); 
    }
    win();
    for(int i=exp+20;exp<i;exp++) 
    {
        cout<<"\n\n\n\n\n\n\n\n\n                      exp:"<<exp<<"+1";
        Sleep(100);
        system("cls"); 
    } 
    cout<<"\n\n\n\n\n\n\n\n\n                      现在你对基本操作有所了解了吧"; 
    Sleep(5000);
    system("cls");
    cout<<"\n\n\n\n\n\n                      ";
    cout<<map[0];
    cout<<"                      ";
    cout<<map[1];
    cout<<"                      ";
    cout<<map[2];
    cout<<"                      ";
    cout<<map[3];
    cout<<"                      ";
    cout<<map[4];
    cout<<"                      ";
    cout<<"输入1:";
    c=getch();
    system("cls");
    if(c!='1')
    {
        cout<<"                      ";
        cout<<"强制输入1";
        Sleep(2000);
    } 
    system("cls");
    cout<<"\n\n\n\n\n\n\n\n\n                      ";
    cout<<map[0];
    cout<<"                      ";
    cout<<"输入1:";
    c=getch();
    if(c!='1')
    {
        cout<<"                      ";
        cout<<"强制输入1";
        Sleep(2000);
    }
    system("cls");
    cout<<"\n\n\n\n\n\n\n\n\n                      loading";
    Sleep(5000);
    system("cls");
    place(1,1);
    chosemap();
     return 0;
}

  

牛顿的跳跃
//转自:https://www.luogu.com.cn/team/32221#main
#include <iostream>
#include <conio.h>
#include <string>
#include <map>
#include <cmath>
#include <windows.h>
#include <time.h> 
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
using namespace std;
int fallspeed;
int jumpspeed = -3;
int gravity = 1;
int  y = 90, x = 15, face, health = 1000, lasthealth = 1000, breath = 100, hungry = 1000;
bool attack, defense, hurt, mode;
struct TNT
{
	int y;
	int x;
	int time;
};
TNT tnt[20];
string die;
struct BLOCK
{
	int color;
	int ch;
};
struct MOB
{
	int fallspeed;
	int health;
	bool hurt;
	int y;
	int x;
	int attack;
	string shap;
	bool isenemy;
	int color;
	string name;
};
MOB mobs[50] = {
	{0,1000,0,0,0,100,"危",true,7,"危"},
	{0,10,0,0,0,10,"  ",true,7,"  "},
	{0,1000,0,0,0,100,"MM",false,7,"MM"},
	{0,1000,0,90,70,-100,"AC",true,7,"Accept"},
	{0,10000,0,90,70,500,"BO",true,7,"BOSS"},
};
MOB mob[100] = {
	{0,1000,0,92,4,100,"WA",true,7,"Wrong Anwser"},
	{0,1000,0,92,4,100,"TL",true,7,"Time Limit Error"},
	{0,2000,0,92,4,300,"CE",true,7,"Compile Error"},
	{0,1000,0,45,9,100,"WA",true,7,"Wrong Anwser"},
	{0,10000,0,90,70,500,"UK",true,7,"Unknown Error"},
	{0,1000,0,92,3,0,"MM",false,7,"MM"},
	{0,1000,0,92,3,0,"MM",false,7,"MM"},
	{0,1000,0,90,15,0,"MM",false,7,"MM"},
	{0,1000,0,90,80,0,"MM",false,7,"MM"},
	{0,100000,0,90,70,-100,"AC",true,7,"Accept"},
	{0,100000,0,90,70,-1000,"AK",true,7,"AK"},
};
string block[30] = {"  ","■","≈","危","≈","≡","〓","Ⅲ","■","▓"};
// 0 空气 1  ■
BLOCK board[100][100];
BLOCK setboard[100][100] = {
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,1},{0,0},{0,0},{7,1},{0,0},{0,0},{7,1},{0,0},{0,0},{7,1},{6,5},{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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{6,5},{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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{6,5},{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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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},{6,5},{6,5},{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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,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,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,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,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,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,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,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,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,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,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,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,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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},{12,3},{12,3},{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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}  ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{7,1},{4,1},{4,1},{4,1},{4,1},{4,1},{4,1},{4,1},{4,1},{7,1},{12,4},{12,4},{12,4},{12,4},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,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},{7,1},{12,4},{12,4},{12,4},{12,4},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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},{7,1},{7,1},{7,1},{7,1},{7,1},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{7,1},{12,4},{0,0},{7,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},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}   ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,1},{0,0},{7,1},{7,1},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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},{12,3},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}   ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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},{7,1},{7,1},{7,1},{12,3},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}   ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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},{12,3},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}   ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{14,9},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,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},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,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,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{7,1},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{7,1},{9,2},{9,2},{9,2},{9,2},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{7,1},{9,2},{9,2},{0,0},{9,2},{7,1},{6,5},{7,1},{0,0},{0,0},{7,1},{8,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},{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,1},{0,0},{0,0},{0,0},{7,1},{7,1},{0,0},{7,1},{7,1},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{7,1},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{14,9},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,1},{8,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},{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{14,9},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{7,1},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{7,1},{7,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},{7,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,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}},
	{{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{7,1},{0,0},{0,0}    ,{0,0},{7,1},{7,1},{7,1},{7,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,0},{0,0},{0,0},{0,0},{0,0},{14,9},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{7,1},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{7,1},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{7,1},{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1}},
	{{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,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},{7,1},{7,1},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{14,9},{0,0},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{6,5},{7,1},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{14,9},{14,9},{14,9},{7,1}},
	{{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{7,1},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,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,0},{0,0},{0,0},{0,0},{0,0},{0,0},{14,9},{14,9},{14,9},{7,1}},
	{{7,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{2,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,0},{0,0},{0,0},{0,0},{14,9},{14,9},{14,9},{7,1}},
	{{7,1},{0,0},{7,1},{7,1},{7,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},{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{12,3},{0,0},{0,0},{0,0},{0,0},{0,0}   ,{0,0},{0,0},{0,0},{0,0},{7,1},{0,0},{2,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},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{7,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},{14,9},{14,9},{14,9},{7,1}},
	{{7,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},{7,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{12,3},{0,0},{0,0},{0,0},{0,0},{0,0}   ,{0,0},{0,0},{0,0},{0,0},{7,1},{10,6},{2,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},{7,1},{9,2},{0,0},{0,0},{0,0},{12,4},{7,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},{14,9},{14,9},{14,9},{7,1}},
	{{7,1},{2,1},{2,1},{2,1},{2,1},{2,1},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{2,1},{2,1},{2,1},{0,0},{9,2},{9,2},{9,2},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{2,1},{7,1}},
	{{7,1},{6,1},{6,1},{6,1},{6,1},{6,1},{0,0},{0,0},{0,0},{0,0},{14,9},{14,9},{14,9},{6,1},{6,1},{0,0},{9,2},{9,2},{9,2},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0} ,{0,0},{0,0},{0,0},{0,0},{7,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{7,1}},
	{{7,1},{6,1},{6,1},{6,1},{6,1},{6,1},{8,1},{8,1},{8,1},{8,1},{14,9},{14,9},{6,1},{6,1},{6,1},{6,1},{9,2},{9,2},{9,2},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}  ,{0,0},{0,0},{0,0},{0,0},{7,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{6,1},{7,1}},
	{{7,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{14,9},{8,1},{8,1},{8,1},{8,1},{8,1},{9,2},{9,2},{9,2},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}   ,{0,0},{0,0},{0,0},{0,0},{7,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{7,1}},
	{{7,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{7,1},{0,0},{0,0},{0,0},{0,0},{0,0}    ,{0,0},{0,0},{0,0},{0,0},{7,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{8,1},{7,1}}
};
void color(int a)
{
	SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
/*	1	深蓝色
	2	深绿色
	3	深青色 
	4	深红色
	5	深粉色
	6	黄色
	7	深白色
	8	灰色
	9	浅蓝色
	10	浅绿色 
	11	浅青色 
	12	浅红色 
	13	浅粉色 
	14	浅黄色 
	15	浅白色 
	背景
	1~15		黑色 
	16~31		深蓝色 
	32~47		深绿色
	48~63		深青色
	64~79		深红色
	'S'~95		深粉色
	96~111		深黄色
	112~127 	深白色
	128~143 	灰色
	144~159 	浅蓝色
	160~1'A' 	浅绿色
	176~191 	浅青色
	192~207 	浅红色
	208~223 	浅粉色
	224~239 	浅黄色
	240~255 	浅白色
*/
}
int mobmove()
{
	for(int j = 0; j < 100; j++)
	{
		if(mob[j].shap == "")
		{
			continue;
		}
		if(mob[j].hurt)
		{
			mob[j].hurt = false;
			mob[j].color = 7;
		}
		if(mob[j].health <= 0)
		{
			mob[j].shap = "";
			mob[j].color = 7;
		}
		if(mob[j].y > 99)
		{
			mob[j].shap = "";
			mob[j].color = 7;
		}
		if(board[mob[j].y][mob[j].x].ch == 4)
		{
			mob[j].health -= 200;
			mob[j].hurt = true;
		}
		if(board[mob[j].y + 1][mob[j].x].ch == 1 && board[mob[j].y + 1][mob[j].x].color == 4)
		{
			mob[j].health -= 100;
			mob[j].hurt = true;
		}
		if(board[mob[j].y][mob[j].x + 1].ch == 8)
		{
			mob[j].health -= 100;
			mob[j].hurt = true;
		}
		if(board[mob[j].y][mob[j].x - 1].ch == 8)
		{
			mob[j].health -= 100;
			mob[j].hurt = true;
		}
		if((mob[j].y == y || mob[j].y == y - 1) && (mob[j].x == x + 1 || mob[j].x == x || mob[j].x == x - 1) && KEY_DOWN(' '))
		{
			mob[j].health -= 100;
			mob[j].hurt = true;
			mob[j].fallspeed = -1;
			mob[j].x -= 3;
		}
		if(mob[j].y == y && mob[j].x == x && mob[j].isenemy)
		{
			health -= mob[j].attack;
			hurt = true;
			die = "被 " + mob[j].name + " 杀死了";
		}
		for(int i = mob[j].y - 1; i >= mob[j].y + mob[j].fallspeed; i--)
		{
			if(board[i - 1][mob[j].x].ch == 1 || board[i - 1][mob[j].x].ch == 9)
			{
				mob[j].fallspeed = 0 - mob[j].y + i + 1;
				return 0;
			}
		}
		for(int i = mob[j].y + 1; i <= mob[j].y + mob[j].fallspeed; i++)
		{
			if(board[i][mob[j].x].ch == 1 || board[i][mob[j].x].ch == 9)
			{
				if(mob[j].fallspeed >= 5 && board[i - 1][mob[j].x].ch != 2)
				{
					mob[j].health -= 50 * (mob[j].fallspeed - 4);
					mob[j].hurt = true;
				}
				mob[j].fallspeed = 0;
				return 0;
			}
		}
		mob[j].y += mob[j].fallspeed;
		mob[j].fallspeed += gravity;
		if(mob[j].isenemy)
		{
			if(mob[j].y > y && (board[mob[j].y + 1][mob[j].x].ch == 1 || board[mob[j].y + 1][mob[j].x].ch == 9))
			{
				if(mob[j].y > y + 50)
				{
					mob[j].fallspeed = -7;
				}
				mob[j].fallspeed = -3;
			}
			if(mob[j].x < x)
			{
				if(board[mob[j].y][mob[j].x + 1].ch != 1 && board[mob[j].y][mob[j].x + 1].ch != 9)
				{
					mob[j].x++;
				}
				else if(board[mob[j].y + 1][mob[j].x].ch == 1 || board[mob[j].y + 1][mob[j].x].ch == 9)
				{
					mob[j].fallspeed = -3;
				}
			}
			else if(mob[j].x > x)
			{
				if(board[mob[j].y][mob[j].x - 1].ch != 1 && board[mob[j].y][mob[j].x - 1].ch != 9)
				{
					mob[j].x--;
				}
				else if(board[mob[j].y + 1][mob[j].x].ch == 1 || board[mob[j].y + 1][mob[j].x].ch == 9)
				{
					mob[j].fallspeed = -3;
				}
			}
		}
		else
		{
			if(rand() % 3 == 0)
			{
				if(board[mob[j].y][mob[j].x + 1].ch != 1 && board[mob[j].y][mob[j].x + 1].ch != 9)
				{
					mob[j].x++;
				}
				else if(board[mob[j].y + 1][mob[j].x].ch == 1 || board[mob[j].y + 1][mob[j].x].ch == 9)
				{
					mob[j].fallspeed = -3;
				}
			}
			else if(rand() % 3 == 1)
			{
				if(board[mob[j].y][mob[j].x - 1].ch != 1 && board[mob[j].y][mob[j].x - 1].ch != 9)
				{
					mob[j].x--;
				} 
				else if(board[mob[j].y + 1][mob[j].x].ch == 1 || board[mob[j].y + 1][mob[j].x].ch == 9)
				{
					mob[j].fallspeed = -3;
				}
			}
		}
		if(mob[j].hurt)
		{
			mob[j].color = 12;
		}
	}
	return 0;
}
int print()
{
	if(!mode)
	{
		color(8);
		cout << "HP:";
		color(12);
		cout << health << endl; 
		for(int i = 0; i < health; i += 100)
		{
			cout << "◆";
		}
		color(7);
		for(int i = health; i < lasthealth; i += 100)
		{
			cout << "◇";
		}
		cout << endl;
		color(8);
		cout << "AIR:";
		color(11);
		cout << breath << endl;
		for(int i = 0; i < breath; i += 10)
		{
			cout << "●";
		}
		for(int i = breath; i < 91; i += 10)
		{
			cout << "○";
		}
		cout << endl;
		color(8);
		cout << "HUNGRY:";
		color(14);
		cout << hungry << endl;
		for(int i = 0; i < hungry; i += 100)
		{
			cout << "§";
		}
		cout << endl;
	} 
	for(int i = y - 7; i <= y + 7; i++)
	{
		for(int j = x - 7; j <= x + 7; j++)
		{
			bool ismob = false;
			for(int k = 0; k < 100; k++)
			{
				if(mob[k].shap == "")
				{
					continue;
				}
				else if(mob[k].x == j && mob[k].y == i)
				{
					color(mob[k].color);
					cout << mob[k].shap;
					ismob = true;
					break;
				}
			}
			if(ismob)
			{
				continue;
			}
			if(i == y - 1 && j == x + face && attack)
			{
				color(4);
				cout << "__";
			}
			else if(i == y - 1 && j == x + face && defense)
			{
				color(6);
				cout << "┋";
			}
			else if(i == y && j == x + face && defense)
			{
				color(6);
				cout << "┋";
			}
			else if(i == y && j == x)
			{
				if (KEY_DOWN('S'))
				{
					color(14);
					if(hurt)
					{
						color(12);
					}
					cout << "()";
				}
				else
				{
					color(9);
					if(hurt)
					{
						color(12);
					}
					cout << "∏";
				}
			}
			else if(i == y - 1 && j == x)
			{
				if (!KEY_DOWN('S'))
				{
					color(14);
					if(hurt)
					{
						color(12);
					}
					cout << "()";
				}
				else
				{
					color(board[i][j].color);
					cout << block[board[i][j].ch];
				}
			}
			else
			{
				if(i < 0 || i >= 100 || j < 0 || j >= 100)
				{
					cout << "  ";
					continue;
				}
				color(board[i][j].color);
				cout << block[board[i][j].ch];
			}
		}
		cout << endl;
	}
	color(7);
	cout << "Y:";
	color(6);
	cout << 100 - y << endl;
	color(7);
	cout << "X:";
	color(6);
	cout << x << endl;
	return 0;
}
int move()
{
	if(board[y][x].ch == 5)
	{
		y += fallspeed;
		return 0;
	}
	if(board[y][x].ch == 2)
	{
		if(fallspeed > 1)
		{
			fallspeed = 1;
		}
	}
	else
	{
		for(int i = y - 1; i >= y + fallspeed; i--)
		{
			if(board[i - 1][x].ch == 1 || board[i - 1][x].ch == 9)
			{
				fallspeed = 0 - y + i + 1;
				return 0;
			}
		}
	}
	for(int i = y + 1; i <= y + fallspeed; i++)
	{
		if(board[i][x].ch == 1 || board[i][x].ch == 9)
		{
			if(fallspeed >= 5 && board[i - 1][x].ch != 2)
			{
				health -= 50 * (fallspeed - 4);
				if(fallspeed >= 7)
				{
					die = "落地过猛!";
				}
				else
				{
					die = "从高处摔了下来!";
				}
				hurt = true;
			}
			fallspeed = 0;
			return 0;
		}
	}
	y += fallspeed;
	fallspeed += gravity;
	return 0;
}
int bomb()
{
	for(int i = 0; i < 20; i++)
	{
		if(tnt[i].time == 0)
		{
			int atk = 0;
			if(abs(x - tnt[i].x) + abs(y - tnt[i].y) == 4)
			{
				atk = 50;
				fallspeed = -1;
				x += x - tnt[i].x;
			}
			if(abs(x - tnt[i].x) + abs(y - tnt[i].y) == 3)
			{
				atk = 100;
				fallspeed = -2;
				x += x - tnt[i].x;
			}
			if(abs(x - tnt[i].x) + abs(y - tnt[i].y) == 2)
			{
				atk = 300;
				fallspeed = -4;
				x += 2 * (x - tnt[i].x);
			}
			if(abs(x - tnt[i].x) + abs(y - tnt[i].y) == 1)
			{
				atk = 500;
				fallspeed = -7;
				x += 5 * (x - tnt[i].x);
			}
			if(abs(x - tnt[i].x) + abs(y - tnt[i].y) == 0)
			{
				atk = 800;
				fallspeed = -10;
			}
			tnt[i].time--;
			health -= atk;
			die = "被TNT炸死了";
			if(atk > 0)
			{
				hurt = true;
			}
			setboard[tnt[i].y - 2][tnt[i].x].color = 7;
			setboard[tnt[i].y - 1][tnt[i].x - 1].color = 7; setboard[tnt[i].y - 1][tnt[i].x].color = 0; setboard[tnt[i].y - 1][tnt[i].x + 1].color = 7;
			setboard[tnt[i].y][tnt[i].x - 2].color = 7; setboard[tnt[i].y][tnt[i].x - 1].color = 0; setboard[tnt[i].y][tnt[i].x].color = 0; setboard[tnt[i].y][tnt[i].x + 1].color = 0; setboard[tnt[i].y][tnt[i].x + 2].color = 7;
			setboard[tnt[i].y + 1][tnt[i].x - 1].color = 7; setboard[tnt[i].y + 1][tnt[i].x].color = 0; setboard[tnt[i].y + 1][tnt[i].x + 1].color = 7;
			setboard[tnt[i].y + 2][tnt[i].x].color = 7;
			setboard[tnt[i].y - 2][tnt[i].x].ch = 8;
			setboard[tnt[i].y - 1][tnt[i].x - 1].ch = 8; setboard[tnt[i].y - 1][tnt[i].x].ch = 0; setboard[tnt[i].y - 1][tnt[i].x + 1].ch = 8;
			setboard[tnt[i].y][tnt[i].x - 2].ch = 8; setboard[tnt[i].y][tnt[i].x - 1].ch = 0; setboard[tnt[i].y][tnt[i].x].ch = 0; setboard[tnt[i].y][tnt[i].x + 1].ch = 0; setboard[tnt[i].y][tnt[i].x + 2].ch = 8;
			setboard[tnt[i].y + 1][tnt[i].x - 1].ch = 8; setboard[tnt[i].y + 1][tnt[i].x].ch = 0; setboard[tnt[i].y + 1][tnt[i].x + 1].ch = 8;
			setboard[tnt[i].y + 2][tnt[i].x].ch = 8;
		}
		else if(tnt[i].time == -1)
		{
			setboard[tnt[i].y - 2][tnt[i].x].color = 0;
			setboard[tnt[i].y - 1][tnt[i].x - 1].color = 0; setboard[tnt[i].y - 1][tnt[i].x].color = 0; setboard[tnt[i].y - 1][tnt[i].x + 1].color = 0;
			setboard[tnt[i].y][tnt[i].x - 2].color = 0; setboard[tnt[i].y][tnt[i].x - 1].color = 0; setboard[tnt[i].y][tnt[i].x].color = 0; setboard[tnt[i].y][tnt[i].x + 1].color = 0; setboard[tnt[i].y][tnt[i].x + 2].color = 0;
			setboard[tnt[i].y + 1][tnt[i].x - 1].color = 0; setboard[tnt[i].y + 1][tnt[i].x].color = 0; setboard[tnt[i].y + 1][tnt[i].x + 1].color = 0;
			setboard[tnt[i].y + 2][tnt[i].x].color = 0;
			setboard[tnt[i].y - 2][tnt[i].x].ch = 0;
			setboard[tnt[i].y - 1][tnt[i].x - 1].ch = 0; setboard[tnt[i].y - 1][tnt[i].x].ch = 0; setboard[tnt[i].y - 1][tnt[i].x + 1].ch = 0;
			setboard[tnt[i].y][tnt[i].x - 2].ch = 0; setboard[tnt[i].y][tnt[i].x - 1].ch = 0; setboard[tnt[i].y][tnt[i].x].ch = 0; setboard[tnt[i].y][tnt[i].x + 1].ch = 0; setboard[tnt[i].y][tnt[i].x + 2].ch = 0;
			setboard[tnt[i].y + 1][tnt[i].x - 1].ch = 0; setboard[tnt[i].y + 1][tnt[i].x].ch = 0; setboard[tnt[i].y + 1][tnt[i].x + 1].ch = 0;
			setboard[tnt[i].y + 2][tnt[i].x].ch = 0;
			tnt[i].time--;
		}
		else if(tnt[i].time > 0)
		{
			tnt[i].time--;
			if(tnt[i].time % 2 == 0)
			{
				setboard[tnt[i].y][tnt[i].x].color = 12;
			}
			else
			{
				setboard[tnt[i].y][tnt[i].x].color = 7;
			}
		}
	}
	return 0;
}
int check()
{
	for(int i = 0; i < 100; i++)
	{
		for(int j = 0; j < 100; j++)
		{
			if(board[i][j].ch == 2)
			{
				if(board[i + 1][j].ch == 0 )
				{
					setboard[i + 1][j].ch = 2;
					setboard[i + 1][j].color = board[i][j].color;
				}
				else if(board[i + 1][j].ch == 4)
				{
					setboard[i + 1][j].ch = 1;
					setboard[i + 1][j].color = 8;
				}
				else if(board[i + 1][j].ch == 1|| board[i + 1][j].ch == 8)
				{
					if(board[i][j + 1].ch == 0)
					{
						setboard[i][j + 1].ch = 2;
						setboard[i][j + 1].color = board[i][j].color;
					}
					else if(board[i][j + 1].ch == 4)
					{
						setboard[i][j + 1].ch = 1;
						setboard[i][j + 1].color = 8;
					}
					if(board[i][j - 1].ch == 0)
					{
						setboard[i][j - 1].ch = 2;
						setboard[i][j - 1].color = board[i][j].color;
					}
					else if(board[i][j - 1].ch == 4)
					{
						setboard[i][j - 1].ch = 1;
						setboard[i][j - 1].color = 8;
					}
				}
			}
			if(board[i][j].ch == 4)
			{
				if(board[i + 1][j].ch == 0)
				{
					setboard[i + 1][j].ch = 4;
					setboard[i + 1][j].color = board[i][j].color;
				}
				else if(board[i + 1][j].ch == 2)
				{
					setboard[i + 1][j].ch = 1;
					setboard[i + 1][j].color = 8;
				}
				else if(board[i + 1][j].ch == 1 || board[i + 1][j].ch == 8)
				{
					if(board[i][j + 1].ch == 0)
					{
						setboard[i][j + 1].ch = 4;
						setboard[i][j + 1].color = board[i][j].color;
					}
					else if(board[i][j + 1].ch == 2)
					{
						setboard[i][j + 1].ch = 1;
						setboard[i][j + 1].color = 8;
					}
					if(board[i][j - 1].ch == 0)
					{
						setboard[i][j - 1].ch = 4;
						setboard[i][j - 1].color = board[i][j].color;
					}
					else if(board[i][j - 1].ch == 2)
					{
						setboard[i][j - 1].ch = 1;
						setboard[i][j - 1].color = 8;
					}
				}
			}
			if(board[i][j].ch == 9)
			{
				if(board[i + 2][j].ch == 0 && board[i + 1][j].ch == 0 && i + 2 < 100)
				{
					setboard[i][j].ch = 0;
					setboard[i][j].color = 0;
					setboard[i + 2][j].ch = 9;
					setboard[i + 2][j].color = board[i][j].color;
					if(board[i][j].color == 8 && j == x && i + 2 == y)
					{
						health -= 600;
						hurt = true;
						die = "被压扁了";
					}
				}
				else if(board[i + 1][j].ch == 0 && i + 1 < 100)
				{
					setboard[i][j].ch = 0;
					setboard[i][j].color = 0;
					setboard[i + 1][j].ch = 9;
					setboard[i + 1][j].color = board[i][j].color;
					if(board[i][j].color == 8 && j == x && i + 1 == y)
					{
						health -= 600;
						hurt = true;
						die = "被压扁了";
					}
					else if(board[i][j].color == 8 && j == x && i + 2 == y)
					{
						health -= 600;
						hurt = true;
						die = "被压扁了";
					}
				}
			}
		}
	}
	for(int i = 0; i < 100; i++)
	{
		for(int j = 0; j < 100; j++)
		{
			board[i][j] = setboard[i][j];
		}
	}
}
int main()
{
	srand((int)time(0));
	for(int i = 0; i < 20; i++)
	{
		tnt[i].time = -2;
	}
	while(1)
	{
		system("cls");
		if(mode)
		{
			hurt = false;
		} 
		if(!mode)
		{
			move();
		} 
		check();
		bomb();
		mobmove();
		print();
		Sleep(70);
		hungry--;
		hungry = max(hungry, 0);
		if(hungry == 0)
		{
			die = "被饿死了";
			hurt = true;
			health -= 10;
		}
		if(mode)
		{
			health = 1000;
		}
		if(health <= 0)
		{
			Sleep(500); 
			system("cls");
			color(12);
			cout << "           GAME OVER           " << endl;
			color(7);
			cout << "   STEVE " << die << endl;
			Sleep(2000);
			x = 15;
			y = 90;
			health = 1000;
			fallspeed = 0;
		}
		health += hungry / 300; 
		if(health > 1000)
		{
			health = 1000; 
		} 
		if(attack)
		{
			attack = 0;
		}
		if(defense)
		{
			defense = 0;
		}
		if(hurt)
		{
			hurt = false;
			lasthealth = health;
		}
		if(board[y][x].ch == 2)
		{
			fallspeed = 1;
			if(KEY_DOWN('W'))
			{
				fallspeed = -1;
			}
		}
		if(board[y - 1][x].ch == 2)
		{
			die = "被水淹死了!"; 
			breath--; 
		}
		else
		{
			breath++; 
			if(breath > 100)
			{
				breath = 100; 
			} 
		} 
		if(board[y][x].ch == 5)
		{
			fallspeed = 0;
			if(KEY_DOWN('W'))
			{
				fallspeed = -1;
			}
			if(KEY_DOWN('S'))
			{
				fallspeed = 1;
			}
		}
		if(board[y][x].ch == 4)
		{
			fallspeed = 1;
			if(KEY_DOWN('W'))
			{
				fallspeed = -1;
			}
			die = "试图在岩浆里游泳!"; 
			hurt = true;
			health -= 100; 
		}
		if (KEY_DOWN('W') && !KEY_DOWN('S'))
		{
			if(mode)
			{
				y--;
			}
			else
			{
				if(board[y][x].ch != 2 && board[y][x].ch != 5)
				{
					if(board[y + 1][x].ch == 1 || board[y + 1][x].ch == 9)
					{
						fallspeed = jumpspeed;
					}
				}
			}
		}
		if (KEY_DOWN('A'))
		{
			if((board[y][x - 1].ch != 1 && board[y][x - 1].ch != 9) || mode)
			{
				if(KEY_DOWN('S') || board[y - 1][x - 1].ch != 1 || mode)
				{
					x -= 1;
				}
			}
			face = -1;
		}
		if (KEY_DOWN('D'))
		{
			if((board[y][x + 1].ch != 1 && board[y][x + 1].ch != 9) || mode)
			{
				if(KEY_DOWN('S') || board[y - 1][x + 1].ch != 1 || mode)
				{
					x += 1;
				}
			}
			face = 1;
		}
		if(KEY_DOWN('S'))
		{
			if(mode)
			{
				y++;
			}
			else
			{
				fallspeed += 1;
			}
		}
		if(KEY_DOWN(' '))
		{
			attack = true;
		}
		if(KEY_DOWN('E'))
		{
			defense = true;
		}
		if(KEY_DOWN('C'))
		{
			hungry += 100;
			hungry = min(hungry, 1000);
		}
		if(KEY_DOWN('Q'))
		{
			setboard[y][x].ch = 7;
			for(int i = 0; i < 20; i++)
			{
				if(tnt[i].time == -2)
				{
					tnt[i] = {y, x, 10};
					break;
				}
			}
		}
		if(KEY_DOWN('R'))
		{
			setboard[y][x].ch = 1;
			setboard[y][x].color = 7;
		}
		if(KEY_DOWN('F'))
		{
			setboard[y + 1][x].ch = 1;
			setboard[y + 1][x].color = 7;
		}
		if(KEY_DOWN('Z'))
		{
			setboard[y + 1][x].ch = 0;
			setboard[y + 1][x].color = 0;
		}
		if(KEY_DOWN('X'))
		{
			setboard[y][x].ch = 3;
			setboard[y][x].color = 12;
		}
		if(KEY_DOWN('3'))
		{
			setboard[y][x].ch = 9;
			setboard[y][x].color = 14;
		}
		if(KEY_DOWN('4'))
		{
			setboard[y][x].ch = 9;
			setboard[y][x].color = 8;
		}
		if(KEY_DOWN('1'))
		{
			setboard[y][x].ch = 2;
			setboard[y][x].color = 9;
		}
		if(KEY_DOWN('2'))
		{
			setboard[y][x].ch = 4;
			setboard[y][x].color = 12;
		}
		if(KEY_DOWN('V'))
		{
			setboard[y][x].ch = 6;
			setboard[y][x].color = 10;
		}
		if(KEY_DOWN('T'))
		{
			system("cls");
			cout << "请输入指令:" << endl;
			string a;
			cin >> a;
			if(a == "kill")
			{
				die = "失败了。";
				hurt = true;
				health = 0; 
			}
			if(a == "full_health")
			{
				health = 1000; 
			}
			if(a == "creativemode")
			{
				mode = !mode;
			}
			if(a == "move")
			{
				cin >> y >> x;
				y = 100 - y;
			}
			if(a == "summom")
			{
				int a;
				cin >> a;
				for(int i = 0; i < 100; i++)
				{
					if(mob[i].shap == "")
					{
						mob[i] = mobs[a];
						mob[i].x = x;
						mob[i].y = y;
						break;
					}
				}
			}
		}
		if(KEY_DOWN('O'))
		{
			for(int i = 0; i < 100; i++)
			{
				for(int j = 0; j < 100; j++)
				{
					setboard[i][j] = {0,0};
				}
			}
		}
		if(y > 100)
		{
			die = "掉出了这个世界!";
			hurt = true;
			health -= 200; 
		}
		if(breath <= 0)
		{
			breath = 0;
			hurt = true;
			health -= 10; 
		}
		if(!KEY_DOWN('S') && (board[y - 1][x].ch == 1 || board[y - 1][x].ch == 9))
		{
			die = "在墙里窒息死亡!";
			hurt = true;
			health -= 50;
		}
		if(board[y + 1][x].ch == 1 && board[y + 1][x].color == 4)
		{
			hurt = true;
			die = "发现了地板是熔岩做的。";
			health -= 30; 
		}
		if(board[y][x].ch == 6)
		{
			fallspeed = -6;
		}
	}
	return 0;
}

  

小游戏 · 13 蒟蒻的双人坦克大战
原作者系xutongwei
#include<cmath>
#include<ctime>
#include<cstdio>
#include<string>
#include<cstdlib>
#include<iostream>
#include<windows.h>
#include<algorithm>
#include<conio.h>
#include<bitset>
using namespace std;
#define KEY_DOWN(VK_NONAME) ((GetAsyncKeyState(VK_NONAME) & 0x8000) ? 1:0)
#define KEY_DOWM(vk_c) (GetAsyncKeyState(vk_c)&0x8000?1:0)
string nicheng,ni;
int len;
struct Button{
    int x,y,color;
    const char *name;
    int len;
};
void block(int x,int y){
    HANDLE   hCon;
    hCon = GetStdHandle(STD_OUTPUT_HANDLE);  
    COORD   setps;
    setps.X = x;
    setps.Y = y;
    SetConsoleCursorPosition(hCon,setps);  
}
void SetPos(COORD a){
    HANDLE out=GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(out, a);
}
void SetPos(int i, int j){
    COORD pos={i, j};
    SetPos(pos);
}
void HideCursor(){
    CONSOLE_CURSOR_INFO cursor_info = {1, 0}; 
    SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
}
void hide(){
    CONSOLE_CURSOR_INFO cursor_info = {1, 0}; 
    SetConsoleCursorInfo(GetStdHandle(STD_OUTPUT_HANDLE), &cursor_info);
}
void GetPos(POINT &pt){
    HWND hwnd=GetForegroundWindow();
    GetCursorPos(&pt);
    ScreenToClient(hwnd,&pt);
    pt.y=pt.y/16,pt.x=pt.x/16;
}
void color(int a){
    SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),a);
}
void gto(int x,int y){
    COORD pos;pos.X=y*2;pos.Y=x;
    SetConsoleCursorPosition(GetStdHandle(STD_OUTPUT_HANDLE),pos);
}
Button NewButton(int x,int y,int color,const char *name){
    Button t;
    t.x=x,t.y=y,t.name=name;
    t.color=color;
    t.len=strlen(name);
    return t;
}
bool Preserve(Button A){
    gto(A.x,A.y),color(A.color),printf("%s",A.name);
    POINT pt;
    GetPos(pt);
    if(pt.y==A.x&&(pt.x>=A.y&&pt.x<=A.y+A.len/2)){
        gto(A.x,A.y),printf("%s",A.name);
        if(KEY_DOWN(MOUSE_MOVED)) return 1;
    }
    return 0;
}

bitset<128>pre;
bitset<128>down;

void pan(char c){
	bool hahbhchdhehfhg;
	if(c == '8'){
		if(!KEY_DOWN(VK_UP))hahbhchdhehfhg=0;
    	else hahbhchdhehfhg=1;
	}else if(c == '5'){
		if(!KEY_DOWN(VK_DOWN))hahbhchdhehfhg=0;
    	else hahbhchdhehfhg=1;
	}else if(c == '4'){
		if(!KEY_DOWN(VK_LEFT))hahbhchdhehfhg=0;
    	else hahbhchdhehfhg=1;
	}else if(c == '6'){
		if(!KEY_DOWN(VK_RIGHT))hahbhchdhehfhg=0;
    	else hahbhchdhehfhg=1;
	}else if(c == '0'){
		if(!KEY_DOWN(VK_NUMPAD0))hahbhchdhehfhg=0;
    	else hahbhchdhehfhg=1;
	}else if(c == '1'){
		if(!KEY_DOWN(VK_NUMPAD1))hahbhchdhehfhg=0;
    	else hahbhchdhehfhg=1;
	}else if(c == '2'){
		if(!KEY_DOWN(VK_NUMPAD2))hahbhchdhehfhg=0;
    	else hahbhchdhehfhg=1;
	}else if(c == '3'){
		if(!KEY_DOWN(VK_NUMPAD3))hahbhchdhehfhg=0;
    	else hahbhchdhehfhg=1;
	}else{
		if(!KEY_DOWN(c))hahbhchdhehfhg=0;
    	else hahbhchdhehfhg=1;
	}
    if(hahbhchdhehfhg)down[c]=1;
    else down[c]=0;
}

bool check(char c){
    if(down[c] != pre[c]){
        pre[c] = down[c];
        if(down[c]){
            return true;
        }
    }
    return false;
}

const int ywl = 15;
const int azl1 = 1000;
const int bzl1 = 1000;
const int tipl = 2;

string tipe[tipl + 2] = {"0", "地雷", "木块"};
int maze[100][100];
int a1 = 10, a2 = 10, b1 = 10, b2 = 20, af = 1, bf = 3, ax = 300, bx = 300, al = 2, bl = 2, ag = 0, bg = 0, au = 1, bu = 1, au1 = 0, bu1 = 0, at = 1, bt = 1, am = 1, bm = 1;
int ca1 = 10, ca2 = 9, cb1 = 10, cb2 = 21, caf = 3, cbf = 1;
bool yw1[ywl + 5], yw2[ywl + 5];
int ywx[ywl + 5], ywy[ywl + 5], ywd[ywl + 5], ywz[ywl + 5];
int qiax[1100], qiay[1100], qial = 0;
bool qiah = false;
int dlx[1100], dly[1100], dlf[1100], dll = 1;
bool dl1[1100], dl2[1100];
int azx[azl1 + 3], azy[azl1 + 3], azf[azl1 + 3], azl = 1;
bool az1[azl1 + 3];
int bzx[bzl1 + 3], bzy[bzl1 + 3], bzf[azl1 + 3], bzl = 1;
bool bz1[bzl1 + 3];
int kuax[1100], kuay[1100], kual = 0;
int qaix[1100], qaiy[1100], qail = 0;
bool qaih = false;
int cu, shcha = 0, summ = 0;
int h1 = 0;
int ah2 = 0, bh2 = 0;
time_t ttime1, ttime2, ttime3;
int dx = 24, dy = 31;
int zqia[41][510] = {{0, 88, 188, 288, 281, 279, 288, 222, 268, 88, 108, 108, 89, 88, 117, 115},
{0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50},
{0, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24},
{0, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 52, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 28, 28, 28, 28, 28, 28, 28, 28, 28, 28, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 36, 36, 36, 36, 36, 36, 36, 36, 36, 36, 40, 40, 40, 40, 40, 40, 40, 40, 40, 40, 44, 44, 44, 44, 44, 44, 44, 44, 44, 44, 48, 48, 48, 48, 48, 48, 48, 48, 48, 48},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 52, 8, 48, 52, 8, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 48, 52, 8, 12, 44, 48, 52, 8, 12, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 44, 48, 52, 8, 12, 16, 40, 44, 48, 52, 8, 12, 16, 20, 22, 24, 26, 28, 30, 32, 34, 36, 40, 44, 48, 52, 8, 12, 16, 20, 36, 40, 44, 48, 52, 8, 12, 16, 20, 24, 26, 28, 30, 32, 36, 40, 44, 48, 52, 8, 12, 16, 20, 24, 36, 40, 44, 48, 52, 8, 12, 16, 20, 24, 28, 30, 32, 34, 36, 40, 44, 48, 52, 8, 12, 16, 20, 24, 40, 44, 48, 52, 8, 12, 16, 20, 24, 26, 28, 30, 32, 34, 36, 38, 40, 44, 48, 52, 8, 12, 16, 20, 44, 48, 52, 8, 12, 16, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 48, 52, 8, 12, 16, 48, 52, 8, 12, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 52, 8, 12, 52, 8, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 30, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 30, 34, 36, 38, 40, 42, 44, 46, 48, 52, 8, 30, 48, 52, 8, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 48, 52, 8, 12, 44, 48, 52, 8, 12, 16, 18, 20, 22, 24, 26, 30, 32, 34, 36, 38, 40, 44, 48, 52, 8, 12, 16, 30, 40, 44, 48, 52, 8, 12, 16, 20, 22, 24, 26, 28, 30, 34, 36, 40, 44, 48, 52, 8, 12, 16, 20, 30, 36, 40, 44, 48, 52, 8, 16, 20, 26, 36, 48, 52, 8, 12, 14, 16, 18, 20, 22, 28, 30, 32, 38, 40, 42, 44, 46, 48, 52, 8, 12, 24, 34, 40, 44, 52, 8, 12, 16, 20, 24, 30, 40, 44, 48, 52, 8, 12, 16, 20, 24, 26, 30, 32, 34, 36, 38, 40, 44, 48, 52, 8, 12, 16, 20, 30, 44, 48, 52, 8, 12, 16, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 48, 52, 8, 12, 16, 48, 52, 8, 12, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 52, 8, 12, 30, 52, 8, 12, 14, 16, 18, 20, 22, 24, 26, 30, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 30, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 20, 38, 42, 44, 52, 8, 14, 20, 28, 34, 38, 44, 46, 50, 52, 8, 10, 16, 24, 30, 32, 34, 38, 42, 44, 52, 8, 12, 14, 18, 20, 22, 26, 28, 32, 34, 38, 44, 46, 50, 52, 8, 18, 38, 42, 44, 52, 8, 10, 12, 14, 18, 22, 24, 26, 28, 32, 34, 38, 42, 44, 46, 50, 52, 8, 14, 18, 22, 24, 28, 32, 34, 46, 52, 8, 12, 14, 22, 28, 30, 32, 38, 40, 42, 46, 50, 52, 8, 16, 18, 22, 24, 30, 36, 38, 42, 52, 8, 12, 16, 18, 22, 28, 30, 32, 38, 42, 44, 46, 48, 52, 8, 12, 22, 24, 30, 36, 38, 48, 52, 8, 12, 14, 16, 18, 22, 28, 30, 32, 38, 42, 44, 48, 52, 8, 18, 22, 24, 30, 36, 38, 42, 44, 52, 8, 10, 14, 18, 20, 22, 28, 30, 32, 38, 46, 48, 52, 8, 14, 26, 28, 32, 36, 38, 42, 46, 52, 8, 10, 14, 16, 18, 22, 26, 28, 32, 34, 36, 38, 42, 46, 48, 50, 52, 8, 16, 18, 22, 42, 52, 8, 10, 14, 16, 22, 26, 28, 32, 34, 38, 40, 42, 46, 48, 52, 8, 16, 18, 22, 26, 28, 30, 36, 44, 50, 52, 8, 10, 14, 16, 22, 26, 32, 40, 46, 52, 8, 16, 18, 22, 40, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 40, 42, 48, 50, 52, 8, 12, 16, 20, 24, 28, 32, 36, 42, 44, 50, 52, 8, 10, 12, 14, 16, 18, 20, 22, 26, 30, 34, 40, 42, 48, 50, 52, 8, 10, 18, 20, 30, 50, 52, 8, 14, 16, 18, 24, 26, 34, 36, 38, 40, 42, 44, 46, 52, 8, 10, 18, 20, 26, 28, 32, 34, 40, 42, 50, 52, 8, 14, 16, 18, 24, 26, 34, 36, 42, 44, 46, 52, 8, 10, 18, 20, 26, 28, 32, 34, 40, 42, 50, 52, 8, 14, 16, 18, 24, 26, 34, 36, 42, 44, 46, 52, 8, 10, 18, 20, 26, 28, 32, 34, 40, 42, 50, 52, 8, 14, 16, 18, 24, 26, 34, 36, 42, 44, 46, 52, 8, 10, 18, 20, 26, 28, 32, 34, 40, 42, 50, 52, 8, 14, 16, 18, 24, 26, 34, 36, 42, 44, 46, 52, 8, 10, 18, 20, 26, 28, 32, 34, 40, 42, 50, 52, 8, 14, 16, 18, 24, 26, 34, 36, 42, 44, 46, 52, 8, 10, 18, 20, 26, 28, 32, 34, 40, 42, 50, 52, 8, 14, 16, 18, 20, 22, 24, 26, 34, 36, 42, 44, 46, 52, 8, 10, 30, 40, 42, 50, 52, 8, 10, 12, 18, 20, 26, 30, 34, 38, 40, 42, 44, 46, 48, 50, 52, 8, 10, 16, 18, 24, 28, 32, 36, 40, 44, 48, 52, 8, 10, 12, 18, 20, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 24, 36, 52, 8, 14, 20, 26, 30, 34, 40, 46, 52, 8, 12, 18, 24, 30, 36, 42, 48, 52, 8, 14, 20, 26, 30, 34, 40, 46, 52, 8, 12, 18, 24, 30, 36, 42, 48, 52, 8, 14, 20, 26, 30, 34, 40, 46, 52, 8, 12, 18, 24, 30, 36, 42, 48, 52, 8, 14, 20, 26, 30, 34, 40, 46, 52, 8, 12, 18, 24, 30, 36, 42, 48, 52, 8, 14, 20, 30, 40, 46, 52, 8, 12, 14, 16, 24, 36, 44, 46, 48, 52, 8, 14, 20, 30, 40, 46, 52, 8, 12, 18, 24, 30, 36, 42, 48, 52, 8, 14, 20, 26, 30, 34, 40, 46, 52, 8, 12, 18, 24, 30, 36, 42, 48, 52, 8, 14, 20, 26, 30, 34, 40, 46, 52, 8, 12, 18, 24, 30, 36, 42, 48, 52, 8, 14, 20, 26, 30, 34, 40, 46, 52, 8, 12, 18, 24, 30, 36, 42, 48, 52, 8, 14, 20, 26, 30, 34, 40, 46, 52, 8, 24, 36, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 52, 8, 12, 14, 16, 20, 26, 28, 30, 32, 34, 40, 44, 46, 48, 52, 8, 12, 20, 26, 34, 40, 48, 52, 8, 12, 16, 18, 20, 22, 26, 30, 34, 38, 40, 42, 44, 48, 52, 8, 12, 20, 30, 40, 48, 52, 8, 12, 14, 16, 20, 24, 26, 28, 30, 32, 34, 36, 40, 44, 46, 48, 52, 8, 12, 20, 30, 40, 48, 52, 8, 12, 16, 18, 20, 22, 26, 30, 34, 38, 40, 42, 44, 48, 52, 8, 12, 20, 26, 34, 40, 48, 52, 8, 12, 14, 16, 20, 26, 28, 30, 32, 34, 40, 44, 46, 48, 52, 8, 20, 40, 52, 8, 12, 14, 16, 20, 26, 28, 30, 32, 34, 40, 44, 46, 48, 52, 8, 12, 20, 26, 34, 40, 48, 52, 8, 12, 16, 18, 20, 22, 26, 30, 34, 38, 40, 42, 44, 48, 52, 8, 12, 20, 30, 40, 48, 52, 8, 12, 14, 16, 20, 24, 26, 28, 30, 32, 34, 36, 40, 44, 46, 48, 52, 8, 12, 20, 30, 40, 48, 52, 8, 12, 16, 18, 20, 22, 26, 30, 34, 38, 40, 42, 44, 48, 52, 8, 12, 20, 26, 34, 40, 48, 52, 8, 12, 14, 16, 20, 26, 28, 30, 32, 34, 40, 44, 46, 48, 52, 8, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 19, 19, 19, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 23, 23, 23, 23, 23, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 52, 8, 52, 8, 16, 24, 32, 40, 48, 52, 8, 52, 8, 52, 8, 52, 8, 16, 24, 32, 40, 48, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 12, 20, 28, 36, 44, 52, 8, 52, 8, 52, 8, 52, 8, 12, 20, 28, 36, 44, 52, 8, 52, 8, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 8, 8, 8, 9, 9, 10, 10, 10, 11, 11, 11, 11, 11, 11, 12, 12, 13, 13, 14, 14, 14, 15, 15, 15, 15, 16, 16, 16, 17, 17, 18, 18, 19, 19, 19, 19, 19, 19, 20, 20, 20, 21, 21, 22, 22, 22, 23, 23, 23, 23, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 52, 8, 52, 8, 32, 40, 52, 8, 16, 52, 8, 52, 8, 16, 52, 8, 18, 22, 32, 40, 52, 8, 52, 8, 52, 8, 28, 52, 8, 10, 50, 52, 8, 32, 52, 8, 52, 8, 52, 8, 20, 28, 38, 42, 52, 8, 44, 52, 8, 52, 8, 44, 52, 8, 20, 28, 52, 8, 52, 8, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 30, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 8, 8, 9, 9, 10, 10, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 20, 20, 21, 21, 22, 22, 23, 23, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 19, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 22, 22, 23, 23, 23, 23, 23, 23, 23, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 52, 8, 52, 8, 14, 22, 30, 38, 46, 52, 8, 52, 8, 18, 42, 52, 8, 52, 8, 14, 22, 30, 38, 46, 52, 8, 52, 8, 52, 8, 52, 8, 14, 22, 30, 38, 46, 52, 8, 52, 8, 52, 8, 52, 8, 14, 22, 30, 38, 46, 52, 8, 52, 8, 18, 42, 52, 8, 52, 8, 14, 22, 30, 38, 46, 52, 8, 52, 8, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52},
{0, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 5, 5, 6, 6, 7, 7, 7, 7, 7, 8, 8, 9, 9, 9, 9, 9, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 13, 13, 14, 14, 15, 15, 15, 15, 15, 15, 15, 16, 16, 17, 17, 18, 18, 19, 19, 19, 19, 19, 19, 19, 20, 20, 21, 21, 21, 21, 21, 22, 22, 23, 23, 23, 23, 23, 24, 24, 25, 25, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26, 26},
{0, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 8, 52, 8, 52, 8, 14, 30, 46, 52, 8, 52, 8, 14, 30, 46, 52, 8, 52, 8, 14, 22, 30, 38, 46, 52, 8, 52, 8, 52, 8, 52, 8, 14, 22, 30, 38, 46, 52, 8, 52, 8, 52, 8, 52, 8, 14, 22, 30, 38, 46, 52, 8, 52, 8, 14, 30, 46, 52, 8, 52, 8, 14, 30, 46, 52, 8, 52, 8, 52, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52}
};
int zqia1[21][11] = {{0},
{0, 5, 10, 25, 50, 23, 23},
{0, 5, 10, 25, 50, 23, 23},
{0, 5, 10, 25, 50, 23, 23},
{0, 5, 10, 25, 50, 23, 23},
{0, 5, 10, 25, 50, 23, 23},
{0, 5, 10, 25, 50, 23, 23},
{0, 15, 22, 15, 38, 23, 23},
{0, 15, 24, 15, 36, 23, 23},
{0, 5, 10, 25, 50, 23, 23},
{0, 5, 10, 25, 50, 23, 23},
{0, 9, 42, 21, 18, 23, 23},
{0, 5, 28, 25, 32, 23, 23},
{0, 5, 10, 25, 50, 23, 23},
{0, 5, 10, 25, 50, 23, 23},
{0, 5, 10, 25, 50, 23, 23}
};

int zqai[41][510]={{0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 31, 56, 198, 175, 100, 38}, 
{0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, {0}, 
{0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24},
{0, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48},
{0, 9, 9, 9, 9, 9, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 21, 21, 21, 21, 21},
{0, 12, 20, 28, 36, 44, 12, 20, 28, 36, 44, 10, 14, 18, 22, 26, 30, 34, 38, 42, 46, 50, 16, 24, 32, 40, 48, 16, 24, 32, 40, 48},
{0, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 9, 9, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 13, 13, 14, 16, 17, 17, 18, 18, 18, 18, 18, 20, 20, 20, 20, 20, 20, 21, 21, 22, 22, 22, 22, 22, 22, 23, 23, 23, 24, 24, 24},
{0, 34, 36, 38, 18, 20, 22, 24, 26, 28, 30, 32, 42, 14, 44, 24, 26, 28, 30, 32, 42, 16, 24, 34, 36, 38, 14, 26, 12, 48, 34, 46, 22, 24, 26, 36, 44, 18, 28, 30, 32, 34, 36, 16, 46, 18, 28, 30, 32, 34, 36, 38, 40, 42, 22, 24, 26},
{0, 5, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 25},
{0, 30, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 46, 48, 12, 30, 48, 12, 16, 18, 20, 22, 24, 26, 30, 32, 34, 36, 38, 40, 42, 44, 48, 12, 16, 44, 48, 12, 16, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 44, 48, 12, 16, 20, 30, 40, 44, 48, 12, 16, 20, 24, 26, 30, 32, 34, 36, 40, 44, 48, 12, 16, 20, 24, 30, 36, 40, 44, 48, 16, 24, 28, 30, 32, 40, 48, 10, 12, 14, 16, 18, 20, 22, 24, 36, 38, 40, 42, 44, 46, 48, 50, 12, 20, 28, 30, 32, 36, 44, 12, 16, 20, 24, 30, 36, 40, 44, 48, 12, 16, 20, 24, 26, 28, 30, 34, 36, 40, 44, 48, 12, 16, 20, 30, 40, 44, 48, 12, 16, 20, 22, 24, 26, 30, 32, 34, 36, 38, 40, 44, 48, 12, 16, 44, 48, 12, 16, 18, 20, 22, 24, 26, 28, 30, 34, 36, 38, 40, 42, 44, 48, 12, 30, 48, 12, 14, 16, 18, 20, 22, 24, 26, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 30},
{0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9, 9, 9, 9, 10, 10, 10, 10, 10, 10, 10, 10, 10, 11, 11, 11, 11, 11, 11, 11, 11, 11, 12, 12, 12, 12, 12, 12, 12, 12, 12, 13, 13, 13, 13, 13, 13, 13, 14, 14, 14, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 16, 16, 16, 17, 17, 17, 17, 17, 17, 17, 18, 18, 18, 18, 18, 18, 18, 18, 18, 19, 19, 19, 19, 19, 19, 19, 19, 19, 20, 20, 20, 20, 20, 20, 20, 20, 20, 21, 21, 21, 21, 21, 21, 21, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 23, 23, 23, 23, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24},
{0, 12, 14, 16, 20, 22, 24, 26, 28, 30, 34, 38, 40, 42, 44, 48, 50, 12, 16, 34, 48, 12, 16, 22, 24, 26, 28, 30, 34, 38, 40, 42, 44, 48, 12, 16, 22, 30, 38, 44, 48, 12, 16, 22, 26, 30, 34, 38, 44, 48, 12, 16, 22, 26, 30, 34, 38, 44, 48, 12, 16, 22, 26, 30, 34, 38, 44, 48, 12, 16, 22, 30, 38, 44, 48, 12, 16, 22, 26, 30, 34, 38, 44, 48, 12, 16, 22, 26, 30, 34, 38, 44, 48, 12, 16, 22, 26, 30, 34, 38, 44, 48, 12, 16, 22, 30, 38, 44, 48, 12, 16, 22, 26, 30, 34, 38, 44, 48, 12, 16, 22, 26, 30, 34, 38, 44, 48, 12, 16, 22, 26, 30, 34, 38, 44, 48, 12, 16, 22, 30, 38, 44, 48, 12, 16, 18, 20, 22, 26, 30, 32, 34, 36, 38, 44, 48, 12, 26, 44, 48, 10, 12, 16, 18, 20, 22, 26, 30, 32, 34, 36, 38, 40, 44, 46, 48},
{0, 6, 6, 6, 6, 6, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 12, 12, 12, 12, 12, 12, 12, 12, 12, 12, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 16, 16, 16, 16, 16, 16, 16, 16, 16, 16, 18, 18, 18, 18, 18, 18, 18, 18, 18, 18, 20, 20, 20, 20, 20, 20, 20, 20, 20, 20, 22, 22, 22, 22, 22, 22, 22, 22, 22, 22, 24, 24, 24, 24, 24, 24, 24, 24, 24, 24},
{0, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48},
{0, 6, 6, 6, 6, 6, 8, 8, 8, 8, 8, 10, 10, 10, 10, 10, 13, 13, 13, 13, 17, 17, 17, 17, 20, 20, 20, 20, 20, 22, 22, 22, 22, 22, 24, 24, 24, 24, 24},
{0, 16, 24, 32, 40, 48, 12, 20, 28, 36, 44, 16, 24, 32, 40, 48, 18, 26, 34, 42, 18, 26, 34, 42, 12, 20, 28, 36, 44, 16, 24, 32, 40, 48, 12, 20, 28, 36, 44}
};

int zkua[41][510] = {{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 55},
{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, 5, 5, 7, 7, 9, 9, 9, 12, 12, 12, 12, 13, 13, 14, 14, 14, 14, 14, 14, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 15, 16, 16, 16, 16, 16, 16, 17, 17, 18, 18, 18, 18, 19, 21, 21, 21, 23, 23, 25, 25},
{0, 18, 50, 22, 38, 10, 22, 38, 20, 28, 36, 44, 12, 48, 10, 18, 26, 34, 42, 50, 10, 12, 16, 18, 20, 24, 26, 28, 32, 34, 36, 40, 42, 44, 48, 50, 10, 18, 26, 34, 42, 50, 12, 48, 16, 24, 32, 40, 10, 22, 38, 50, 22, 38, 10, 42}
};

void output(int fxx, int fyy){
	int now = maze[fxx][fyy];
	if(now == 0){
		color(15);
		block(fyy, fxx);
		cout << "  ";
		SetPos(fyy, fxx);
		cout << "  ";
		return;
	}
	int now1 = now / 1000;
	int now2 = now % 1000;
	if(now1 == 1){
		if(now2 == 1){
        	block(a2, a1);
	        color(11);
	        if(af == 1){
	            cout << "←";
	        }else if(af == 2){
	            cout << "↑";
	        }else if(af == 3){
	            cout << "→";
	        }else{
	            cout << "↓";
	        }
		}else if(now2 == 2){
			block(b2, b1);
	        color(14);
	        if(bf == 1){
	            cout << "←";
	        }else if(bf == 2){
	            cout << "↑";
	        }else if(bf == 3){
	            cout << "→";
	        }else{
	            cout << "↓";
	        }
		}
	}else if(now1 == 2){
		if(ywz[now2] == 1 || ywz[now2] == 3){
            color(12 * 16 + 7);
		}else{
			color(13 * 16 + 7);
		}
		block(ywy[now2], ywx[now2]);
        if(ywz[now2] == 1){
            cout << "LL";
        }else if(ywz[now2] == 2){
		    cout << "GJ";
        }else if(ywz[now2] == 3){
        	cout << "ZD";
		}else if(ywz[now2] == 4){
			cout << "DL";
		}else if(ywz[now2] == 5){
			cout << "HP";
		}else if(ywz[now2] == 6){
			cout << "MK";
		}
	}else if(now1 == 3){
		block(qiay[now2], qiax[now2]);
        color(8 * 16 + 8);
        cout << "  ";
	}else if(now1 == 4){
		block(qaiy[now2], qaix[now2]);
        color(3 * 16);
        cout << "·";
	}else if(now1 == 5){
		block(kuay[now2], kuax[now2]);
		color(6 * 16 + 6);
		cout << "  ";
	}
	return;
}

void aguag(){
	if(ag){
        cu = al;
        al += 30;
    }
	if(af == 1){
		if(a1 == b1 && (a2 - b2) <= al * 2 + 2 && (a2 - b2) > 0){
            bx -= 10;
        	if(ag){
				bx -= 10;
            }
        }
	}else if(af == 2){
		if(a2 == b2 && (a1 - b1) <= al && (a1 - b1) > 0){
            bx -= 10;
            if(ag){
                bx -= 10;
            }
        }
	}else if(af == 3){
		if(a1 == b1 && (b2 - a2) <= al * 2 + 2 && (b2 - a2) > 0){
            bx -= 10;
            if(ag){
                bx -= 10;
            }
        }
	}else if(af == 4){
		if(a2 == b2 && (b1 - a1) <= al && (b1 - a1) > 0){
            bx -= 10;
            if(ag){
                bx -= 10;
            }
        }
	}
	if(ag) {
		al = cu;
	}
	return;
}

void agua2(){
	color(11);
	if(ag){
        cu = al;
        al += 30;
    }
    if(af == 1){
        if(a2 >= 4 + al * 2){
            output(a1, a2 - 2 - al * 2);
            for(int i = a2 - al * 2; i <= a2 - 2; i += 2){
                output(a1, i);
            }
            output(a1, a2);
    	}else{
            output(a1, 2);
            for(int i = 4; i <= a2 + 2; i += 2){
                output(a1, i);
            }
        }
    }else if(af == 2){
        if(a1 >= al + 4){
            output(a1 - al - 1, a2);
            for(int i = a1 - al; i <= a1; i++){
                output(i, a2);
            }
        }else{
            output(3, a2);
            for(int i = 4; i <= a1; i++){
                output(i, a2);
            }
        } 
    }else if(af == 3){
        output(a1, a2);
        for(int i = a2 + 2; i <= a2 + al * 2 + 4 && i <= 70; i += 2){
            output(a1, i);
        }
    }else if(af == 4){
        for(int i = a1; i <= a1 + al + 1 && i <= 27; i++){
            output(i, a2);
        }
    }
    if(ag){
        al = cu;
        ag--;
    }
    return;
}

void agua(){
	color(11);
    if(ag){
        color(1 + 11 * 16);
        cu = al;
        al += 30;
    }
    if(af == 1){
        if(a2 >= 4 + al * 2){
            SetPos(a2 - 2 - al * 2, a1);
            cout << "←";
            for(int i = a2 - al; i <= a2 - 1; i++){
                cout << "—"; 
            }
            cout << "—";
    	}else{
            SetPos(2, a1);
            cout << "←";
            for(int i = 2; i <= a2 - 1; i += 2){
                cout << "—"; 
            }
        }
    }else if(af == 2){
        if(a1 >= al + 4){
            SetPos(a2, a1 - al - 1);
            cout << "↑";
            for(int i = a1 - al; i <= a1; i++){
                SetPos(a2, i);
                cout << "|";
            }
        }else{
            SetPos(a2, 3);
            cout << "↑";
            for(int i = 4; i <= a1; i++){
                SetPos(a2, i);
                cout << "|";
            }
        } 
    }else if(af == 3){
        SetPos(a2, a1);
        for(int i = a2 + 2; i <= a2 + al * 2 + 2 && i + 2 <= 70; i += 2){
            cout << "—"; 
        }
        cout << "→";
    }else if(af == 4){
    	int i;
        for(i = a1; i <= a1 + al && i + 1 <= 27; i++){
            SetPos(a2, i);
            cout << "|";
        }
        SetPos(a2, i);
        cout << "↓";
    }
    if(ag){
        al = cu;
        ag--;
        color(15);
    }
    return;
}

void bguag(){
	if(bg){
        cu = bl;
        bl += 30;
    }
	if(bf == 1){
		if(a1 == b1 && (b2 - a2) <= bl * 2 + 2 && (b2 - a2) > 0){
            ax -= 10;
            if(bg){
                ax -= 10;
            }
        }
	}else if(bf == 2){
		if(a2 == b2 && (b1 - a1) <= bl && (b1 - a1) > 0){
            ax -= 10;
            if(bg){
            	ax -= 10;
            }
        }
	}else if(bf == 3){
		if(a1 == b1 && (a2 - b2) <= bl * 2 + 2 && (a2 - b2) > 0){
            ax -= 10;
            if(bg){
                ax -= 10;
            }
        }
	}else if(bf == 4){
		if(a2 == b2 && (a1 - b1) <= bl && (a1 - b1) > 0){
            ax -= 10;
            if(bg){
                ax -= 10;
            }
        }
	}
	if(bg){
        bl = cu;
    }
	return;
}

void bgua2(){
	color(14);
	if(bg){
        cu = bl;
        bl += 30;
    }
    if(bf == 1){
        if(b2 >= 4 + bl * 2){
            output(b1, b2 - 2 - bl * 2);
            for(int i = b2 - bl * 2; i <= b2; i += 2){
                output(b1, i);
            }
    	}else{
            output(b1, 2);
            for(int i = 4; i <= b2 + 1; i += 2){
                output(b1, i);
            }
        }
    }else if(bf == 2){
        if(b1 >= bl + 4){
            output(b1 - bl - 1, b2);
            for(int i = b1 - bl; i <= b1; i++){
                output(i, b2);
            }
        }else{
            output(3, b2);
            for(int i = 4; i <= b1; i++){
                output(i, b2);
            }
        } 
    }else if(bf == 3){
        output(b1, b2);
        for(int i = b2 + 2; i <= b2 + bl * 2 + 4 && i <= 70; i += 2){
            output(b1, i);
        }
    }else if(bf == 4){
        for(int i = b1; i <= b1 + bl + 1 && i <= 27; i++){
            output(i, b2);
        }
    }
    if(bg){
        bl = cu;
        bg--;
    }
    return;
}

void bgua(){
	color(14);
    if(bg){
        color(6 + 14 * 16);
        cu = bl;
        bl += 30;
    }
    if(bf == 1){
        if(b2 >= bl * 2 + 4){
            SetPos(b2 - bl * 2 - 2, b1);
            cout << "←";
            for(int i = b2 - bl; i <= b2 - 1; i++){
                cout << "—"; 
            }
            cout << "—";
        }else{
            SetPos(2, b1);
            cout << "←";
            for(int i = 2; i <= b2 - 1; i += 2){
                cout << "—"; 
            }
        }
    }else if(bf == 2){
        if(b1 >= bl + 4){
            SetPos(b2, b1 - bl - 1);
            cout << "↑";
            for(int i = b1 - bl; i <= b1; i++){
                SetPos(b2, i);
                cout << "|";
            }
        }else{
            SetPos(b2, 3);
            cout << "↑";
            for(int i = 4; i <= b1; i++){
                SetPos(b2, i);
                cout << "|";
            }
        }
    }else if(bf == 3){
        SetPos(b2, b1);
        for(int i = b2 + 2; i <= b2 + bl * 2 + 2 && i + 2 <= 70; i += 2){
            cout << "—"; 
        }
        cout << "→";
    }else if(bf == 4){
    	int i; 
        for(i = b1; i <= b1 + bl && i + 1 <= 27; i++){
            SetPos(b2, i);
            cout << "|";
		}
        SetPos(b2, i);
        cout << "↓";
    }
    if(bg){
        bl = cu;
        bg--;
        color(15);
    }
    return;
}

int main( ){
	system("mode con cols=72 lines=29");
	block(1, 1);
    cout << "本游戏由XTW蒟蒻编制" << endl;
    Sleep(1500);
    p1:block(1, 2);
    cout << "请输入模式(1.正常  2.关卡)" << endl;
    block(1, 3);
    char zzzzz1 = getch();
    if(zzzzz1 == '1'){
    	cout << '1' << endl;
    	Sleep(1000);
    	HideCursor(); 
    	system("cls");
	    qial++;
	    qiax[qial] = 10;
	    qiay[qial] = 16;
	    block(qiay[qial], qiax[qial]);
	    color(8 * 16 + 8);
	    cout << "  ";
	    maze[qiax[qial]][qiay[qial]] = 3000 + qial;
	}else if(zzzzz1 == '2'){
		cout << '2' << endl;
		qaih = qiah = true;
		Sleep(1000);
		p2:block(1, 4);
		cout << "请选择关卡(1~f)" << endl;
		block(1, 5);
		char zzzzz2 = getch();
		if(zzzzz2 >= '1' && zzzzz2 <= '9' || zzzzz2 >= 'a' && zzzzz2 <= 'f'){
			int zzzzz3;
			if(zzzzz2 <= '9' && zzzzz2 >= '1'){
				zzzzz3 = zzzzz2 - '0';
			}else{
				zzzzz3 = zzzzz2 - 'a' + 10;
			}
			cout << zzzzz2 << endl;
			block(1, 6);
			Sleep(1000);
			HideCursor(); 
			system("cls");
			for(int i = 1; i <= zqia[0][zzzzz3]; i++){
				qial++;
			    qiax[qial] = zqia[zzzzz3 * 2 - 1][i];
			    qiay[qial] = zqia[zzzzz3 * 2][i];
			    block(qiay[qial], qiax[qial]);
			    color(8 * 16 + 8);
			    cout << "  ";
			    maze[qiax[qial]][qiay[qial]] = 3000 + qial;	
			}
			for(int i = 1; i <= zqai[0][zzzzz3]; i++){
				qail++;
			    qaix[qail] = zqai[zzzzz3 * 2 - 1][i];
			    qaiy[qail] = zqai[zzzzz3 * 2][i];
			    block(qaiy[qail], qaix[qail]);
			    color(3 * 16);
			    cout << "·";
			    maze[qaix[qail]][qaiy[qail]] = 4000 + qail;	
			}
			for(int i = 1; i <= zkua[0][zzzzz3]; i++){
				kual++;
			    kuax[kual] = zkua[zzzzz3 * 2 - 1][i];
			    kuay[kual] = zkua[zzzzz3 * 2][i];
			    block(kuay[kual], kuax[kual]);
			    color(6 * 16 + 6);
			    cout << "  ";
			    maze[kuax[kual]][kuay[kual]] = 5000 + kual;	
			}
			ca1 = a1 = zqia1[zzzzz3][1];
			ca2 = a2 = zqia1[zzzzz3][2];
			cb1 = b1 = zqia1[zzzzz3][3];
			cb2 = b2 = zqia1[zzzzz3][4];
			dx = zqia1[zzzzz3][5];
			dy = zqia1[zzzzz3][6];
		}else{
			goto p2;
		}
	}else{
		goto p1;
	}
    ttime3 = time(NULL);
    while(ax > 0 && bx > 0){
    	if(au1){
    		au1--;
		}
		if(bu1){
			bu1--;
		}
    	if(h1){
    		h1--;
		}
        ttime2 = time(NULL);
        if(ttime2 >= ttime3 + 1){
            shcha = 0;
            ttime3 = ttime2;
            summ++;
        }else{
            shcha += 11;
        }
        block(0, 0);
        color(15);
        cout << "player1:  HP:" << ax << "  TP:" << tipe[at] << "  GJ:" << ag / 3 << "  ZD:" << azl << "  DL:" << au << "  MK:" << am << endl;
        cout << "player2:  HP:" << bx << "  TP:" << tipe[bt] << "  GJ:" << bg / 3 << "  ZD:" << bzl << "  DL:" << bu << "  MK:" << bm << endl;
        //if(a1 != ca1 || a2 != ca2 || af != caf){
        	block(ca2, ca1);
    		color(15);
    		cout << "  ";
    		maze[ca1][ca2] = 0;
        	block(a2, a1);
	        color(11);
	        if(af == 1){
	            cout << "←";
	        }else if(af == 2){
	            cout << "↑";
	        }else if(af == 3){
	            cout << "→";
	        }else{
	            cout << "↓";
	        }
	        maze[a1][a2] = 1001;
		//}
		//if(b2 != cb2 || b1 != cb1 || bf != cbf){
			block(cb2, cb1);
    		color(15);
    		cout << "  ";
    		maze[cb1][cb2] = 0;
			block(b2, b1);
	        color(14);
	        if(bf == 1){
	            cout << "←";
	        }else if(bf == 2){
	            cout << "↑";
	        }else if(bf == 3){
	            cout << "→";
	        }else{
	            cout << "↓";
	        }
	        maze[b1][b2] = 1002;
		//}
		ca1 = a1;
        ca2 = a2;
        cb1 = b1;
        cb2 = b2;
        caf = af;
        cbf = bf;
        color(15);
        block(0, 0);
        cout << endl << endl;
        color(15);
        pan('P');
        pan('W');
        pan('S');
        pan('A');
        pan('D');
        pan('K');
        pan('L');
        pan('I');
        pan('O');
        pan('8');
        pan('5');
        pan('4');
        pan('6');
        pan('0');
        pan('1');
        pan('2');
        pan('3');
        if(check('P')){
        	color(15);
        	system("cls");
        	p6:block(25, 10);
			cout << "╭———————╮";
			block(25, 11);
			cout << "| 游  戏  暂  停 |";
			block(25, 12);
			cout << "| 继续:P  规则:Q |";
			block(25, 13);
			cout << "╰———————╯";
			while(true){
				pan('P');
				pan('Q');
				if(check('Q')){
					system("cls");
					block(25, 10);
					cout << "╭——————╮";
					block(25, 11);
					color(15);
					cout << "| ";
					color(11);
					cout << "player1:蓝色";
					color(15);
					cout << " |";
					block(25, 12);
					cout << "| 上:W 下:S  |";
					block(25, 13);
					cout << "| 左:A 右:D  |";
					block(25, 14);
					cout << "| 光波:K HP-10 |";
					block(25, 15);
					cout << "| 子弹:L HP-10 |";
					block(25, 16);
					cout << "| 切换副武器:I |";
					block(25, 17);
					cout << "| 使用副武器:Q |";
					block(25, 18);
					cout << "|   地雷 HP-25 |";
					block(25, 19);
					cout << "|   木块 放置  |";
					block(25, 20);
					cout << "╰——————╯";
					block(25, 21);
					Sleep(1500);
					system("pause");
					system("cls");
					block(25, 10);
					cout << "╭——————╮";
					block(25, 11);
					cout << "| ";
					color(14);
					cout << "player2:黄色";
					color(15);
					cout << " |";
					block(25, 12);
					cout << "| 上:↑下:↓ |";
					block(25, 13);
					cout << "| 左:←右:→ |";
					block(25, 14);
					cout << "| 光波:0 HP-10 |";
					block(25, 15);
					cout << "| 子弹:1 HP-10 |";
					block(25, 16);
					cout << "| 切换副武器:2 |";
					block(25, 17);
					cout << "| 使用副武器:3 |";
					block(25, 18);
					cout << "|   地雷 HP-25 |";
					block(25, 19);
					cout << "|   木块 放置  |";
					block(25, 20);
					cout << "╰——————╯";
					block(25, 21);
					Sleep(1500);
					system("pause");
					system("cls");
					block(25, 10);
					cout << "╭———————╮";
					block(25, 11);
					cout << "| 墙:";
					color(8 * 16 + 8);
					cout << "  ";
					color(15);
					cout << "         |";
					block(25, 12);
					cout << "| 挡住坦克与子弹 |";
					block(25, 13);
					cout << "| 药丸:         |";
					block(25, 14);
					cout << "| ";
					color(12 * 16 + 7);
					cout << "LL";
					color(15);
					cout << ":光波长度+1 |";
					block(25, 15);
					cout << "| ";
					color(13 * 16 + 7);
					cout << "GJ";
					color(15);
					cout << ":光波加强*2 |";
					block(25, 16);
					cout << "| ";
					color(12 * 16 + 7);
					cout << "ZD";
					color(15);
					cout << ":子弹容量+1 |";
					block(25, 17);
					cout << "| ";
					color(13 * 16 + 7);
					cout << "DL";
					color(15);
					cout << ":地雷数量+1 |";
					block(25, 18);
					cout << "| ";
					color(13 * 16 + 7);
					cout << "HP";
					color(15);
					cout << ":玩家血量+8 |";
					block(25, 19);
					cout << "| ";
					color(13 * 16 + 7);
					cout << "MK";
					color(15);
					cout << ":木块数量+4 |";
					block(25, 20);
					cout << "| 狙击孔:";
					color(3 * 16);
					cout << "·";
					color(15);
					cout << "     |";
					block(25, 21);
					cout << "|       阻挡坦克 |";
					block(25, 22);
					cout << "| 木块:";
					color(6 * 16 + 6);
					cout << "  ";
					color(15);
					cout << "       |";
					block(25, 23);
					cout << "|     阻挡坦克, |";
					block(25, 24);
					cout << "|   可被子弹击破 |";
					block(25, 25);
					cout << "╰———————╯";
					Sleep(1500);
					block(25, 26);
					system("pause");
					system("cls");
					goto p6;
				}else if(check('P')){
					break;
				}
				Sleep(100);
			}
			system("cls");
			for(int i = 1; i <= ywl; i++){
	            if(yw2[i]){
	            	if(ywz[i] == 1 || ywz[i] == 3){
            			color(12 * 16 + 7);
					}else{
						color(13 * 16 + 7);
					}
					block(ywy[i], ywx[i]);
			        if(ywz[i] == 1){
			            cout << "LL";
			        }else if(ywz[i] == 2){
					    cout << "GJ";
			        }else if(ywz[i] == 3){
			        	cout << "ZD";
					}else if(ywz[i] == 4){
						cout << "DL";
					}else if(ywz[i] == 5){
						cout << "HP";
					}
	            }
	        }
	        for(int i = 1; i <= qial; i++){
	            block(qiay[i], qiax[i]);
	            color(8 * 16 + 8);
	            cout << "  ";
	        }
	        for(int i = 1; i <= qail; i++){
	            block(qaiy[i], qaix[i]);
	            color(3 * 16);
	            cout << "·";
	        }
		}
        if(ah2 == 1){
        	agua2();
        	ah2--;
		}
        if(ah2 == 2){
        	agua();
        	ah2--;
		}else if(check('W')){
            if(af == 1){
                if(a2 > 2){
                	a2 -= 2;
                }
            }else if(af == 2){
                if(a1 > 3){
                    a1--;
                }
            }else if(af == 3){
            	if(a2 < 68){
            		a2 += 2;
				}
            }else if(af == 4){
            	if(a1 < 27){
            		a1++;
				}
            }
        }else if(check('S')){
            if(af == 1){
            	if(a2 < 68){
            		a2 += 2;
				}
            }else if(af == 2){
            	if(a1 < 27){
            		a1++;
				}
            }else if(af == 3){
                if(a2 > 2){
                    a2 -= 2;
                }
            }else if(af == 4){
                if(a1 > 3){
                    a1--;
                }
            }
        }else if(check('A')){
            if(af == 1){
                af = 4;
            }else{
                af--;
            }
        }else if(check('D')){
            if(af == 4){
                af = 1;
            }else{
                af++;
            }
        }else if(check('K')){
        	if(!au1){
        		au1 = 15;
		    	agua();
            	aguag();
            	ah2 = 2;
        	}
        }else if(check('L')){
        	for(int i = 1; i <= azl; i++){
        		if(!az1[i]){
        			az1[i] = true;
        			azx[i] = a1;
        			azy[i] = a2;
        			azf[i] = af;
        			break;
				}
			}
		}else if(check('I')){
			if(at == tipl){
				at = 1;
			}else{
				at++;
			}
		}else if(check('O')){
			if(au >= 1 && at == 1){
				au--;
				dlf[dll] = ttime1 + 10;
				dlx[dll] = a1;
				dly[dll] = a2;
				dl1[dll] = true;
				block(a2, a1);
				color(12);
				cout << "¤";
				dll++;
			}else if(am >= 1 && at == 2){
				int zam1 = a1, zam2 = a2;
				bool zam3 = false;
				if(af == 1){
	                if(zam2 > 2){
	                	zam2 -= 2;
	                	zam3 = true;
	                }
	            }else if(af == 2){
	                if(zam1 > 3){
	                    zam1--;
	                    zam3 = true;
	                }
	            }else if(af == 3){
	            	if(zam2 < 68){
	            		zam2 += 2;
	            		zam3 = true;
					}
	            }else if(af == 4){
	            	if(zam1 < 27){
	            		zam1++;
	            		zam3 = true;
					}
	            }
	            if(zam3 && maze[zam1][zam2] == 0){
	            	am--;
	            	kual++;
	            	kuax[kual] = zam1;
	            	kuay[kual] = zam2;
	            	maze[zam1][zam2] = 5000 + kual;
	            	block(kuay[kual], kuax[kual]);
	            	color(6 * 16 + 6);
	            	cout << "  ";
				}
			}
		}
		if(bh2 == 1){
			bgua2();
			bh2--;
		}
        if(bh2 == 2){
        	bgua();
        	bh2--;
		}else if(check('8')){
            if(bf == 1){
                if(b2 > 2){
                    b2 -= 2;
                }
            }else if(bf == 2){
                if(b1 > 3){
                    b1--;
                }
            }else if(bf == 3){
            	if(b2 < 68){
            		b2 += 2;
				}
            }else if(bf == 4){
            	if(b1 < 27){
            		b1++;
				}
            }
        }else if(check('5')){
            if(bf == 1){
            	if(b2 < 68){
            		b2 += 2;
				}
            }else if(bf == 2){
            	if(b1 < 27){
            		b1++;
				}
            }else if(bf == 3){
                if(b2 > 2){
                    b2 -= 2;
                }
            }else if(bf == 4){
                if(b1 > 3){
                    b1--;
                }
            }
        }else if(check('4')){
            if(bf == 1){
                bf = 4;
            }else{
                bf--;
            }
        }else if(check('6')){
            if(bf == 4){
                bf = 1;
            }else{
                bf++;
            }
        }else if(check('0')){
        	if(!bu1){
        		bu1 = 15;
            	bgua();
            	bguag();
            	bh2 = 2;
        	}
        }else if(check('1')){
        	for(int i = 1; i <= bzl; i++){
        		if(!bz1[i]){
        			bz1[i] = true;
        			bzx[i] = b1;
        			bzy[i] = b2;
        			bzf[i] = bf;
        			break;
				}
			}
		}else if(check('2')){
			if(bt == tipl){
				bt = 1;
			}else{
				bt++;
			}
		}else if(check('3')){
			if(bu >= 1 && bt == 1){
				bu--;
				dlf[dll] = ttime1 + 10;
				dlx[dll] = b1;
				dly[dll] = b2;
				dl1[dll] = true;
				block(b2, b1);
				color(12);
				cout << "¤";
				dll++;
			}else if(bm >= 1 && bt == 2){
				int zbm1 = b1, zbm2 = b2;
				bool zbm3 = false;
				if(bf == 1){
	                if(zbm2 > 2){
	                	zbm2 -= 2;
	                	zbm3 = true;
	                }
	            }else if(bf == 2){
	                if(zbm1 > 3){
	                    zbm1--;
	                    zbm3 = true;
	                }
	            }else if(bf == 3){
	            	if(zbm2 < 68){
	            		zbm2 += 2;
	            		zbm3 = true;
					}
	            }else if(bf == 4){
	            	if(zbm1 < 27){
	            		zbm1++;
	            		zbm3 = true;
					}
	            }
	            if(zbm3 && maze[zbm1][zbm2] == 0){
	            	bm--;
	            	kual++;
	            	kuax[kual] = zbm1;
	            	kuay[kual] = zbm2;
	            	maze[zbm1][zbm2] = 5000 + kual;
	            	block(kuay[kual], kuax[kual]);
	            	color(6 * 16 + 6);
	            	cout << "  ";
				}
			}
		}
        ttime1 = time(NULL);
        for(int i = 1; i <= qail; i++){
            if(qaix[i] == a1 && qaiy[i] == a2){
                a1 = ca1;
                a2 = ca2;
            }
            if(qaix[i] == b1 && qaiy[i] == b2){
                b1 = cb1;
                b2 = cb2;
            }
        }
        for(int i = 1; i <= qial; i++){
            if(qiax[i] == a1 && qiay[i] == a2){
                a1 = ca1;
                a2 = ca2;
            }
            if(qiax[i] == b1 && qiay[i] == b2){
                b1 = cb1;
                b2 = cb2;
            }
        }
        for(int i = 1; i <= kual; i++){
        	if(kuax[i] == a1 && kuay[i] == a2){
        		a1 = ca1;
        		a2 = ca2;
			}
			if(kuax[i] == b1 && kuay[i] == b2){
				b1 = cb1;
				b2 = cb2;
			}
		}
        for(int i = 1; i < dll; i++){
        	if(dl2[i]){
        		block(dly[i], dlx[i]);
        		color(15);
	            if(dlx[i] == a1 && dly[i] == a2){
	                ax -= 25;
	                block(a2, a1);
					color(12);
					cout << "¤";
					dl1[i] = dl2[i] = false;
	            }
	            if(dlx[i] == b1 && dly[i] == b2){
	            	bx -= 25;
	                block(b2, b1);
					color(12);
					cout << "¤";
					dl1[i] = dl2[i] = false;
	            }
	        }else if(ttime1 < dlf[i]){
	        	block(dly[i], dlx[i]);
				color(12);
				cout << "·";
			}else if(dl1[i]){
				dl2[i] = true;
				block(dly[i], dlx[i]);
				color(15);
				cout << "  ";
			}else{
				continue;
			}
        }
        for(int i = 1; i <= ywl; i++){
            if(!yw2[i]){
                continue;
            }else if(ywx[i] == a1 && ywy[i] == a2){
                if(ywz[i] == 1){
                    al++;
                }else if(ywz[i] == 2){
                    ag += 3;
                }else if(ywz[i] == 3){
                	azl++;
				}else if(ywz[i] == 4){
					au++;
				}else if(ywz[i] == 5){
					ax += 8;
				}else if(ywz[i] == 6){
					am += 4;
				}
                yw1[i] = false;
                yw2[i] = false;
            }else if(ywx[i] == b1 && ywy[i] == b2){
                if(ywz[i] == 1){
                    bl++;
                }else if(ywz[i] == 2){
                    bg += 3;
                }else if(ywz[i] == 3){
                	bzl++;
				}else if(ywz[i] == 4){
					bu++;
				}else if(ywz[i] == 5){
					bx += 8;
				}else if(ywz[i] == 6){
					bm += 4;
				}
                yw1[i] = false;
                yw2[i] = false;
            }else{
            	bool h3 = false;
            	for(int j = 1; j <= qial; j++){
		            if(qiax[j] == ywx[i] && qiay[j] == ywy[i]){
		                h3 = true;
		                break;
		            }
		        }
		        for(int j = 1; j <= qail; j++){
		            if(qaix[j] == ywx[i] && qaiy[j] == ywy[i]){
		                h3 = true;
		                break;
		            }
		        }
		        for(int j = 1; j <= kual; j++){
		            if(kuax[j] == ywx[i] && kuay[j] == ywy[i]){
		                h3 = true;
		                break;
		            }
		        }
		        if(h3){
		        	yw1[i] = false;
		        	yw2[i] = false;
				}else{
					continue;
				}
			}
            block(ywy[i], ywx[i]);
            color(15);
            cout << "  ";
            maze[ywx[i]][ywy[i]] = 0;
        }
        for(int i = 1; i <= ywl; i++){
            if(!yw1[i]){
                if(h1){
                    break;
                }
                srand(time(NULL) + shcha);
                int sui1 = (rand() % (30 * 6 + shcha));
                shcha += 17;
                ywd[i] = sui1 % 30 * 2 + 15 + ttime1;
                yw1[i] = true;
                ywz[i] = sui1 % 6 + 1;
                h1 = 11;
                break;
            }else if(ttime1 < ywd[i]){
                continue;
            }else if(yw2[i]){
                continue;
            }else{
                srand(time(NULL));
                int sui2 = (rand() % (40 * dy + shcha)) + 1;
                shcha += 19;
                ywx[i] = sui2 % dx + 4;
                ywy[i] = sui2 / 40 % dy * 2 + 8;
                if(ywx[i] == a1 && ywy[i] == a2){
                    ywx[i] += 2;
                }
                if(ywx[i] == b1 && ywy[i] == b2){
                    ywy[i] += 2;
                }
                if(ywx[i] == a1 && ywy[i] == a2){
                    ywx[i] += 2;
                    ywy[i] += 2;
            	}
            	bool h3 = false;
            	for(int j = 1; j <= qial; j++){
		            if(qiax[j] == ywx[i] && qiay[j] == ywy[i]){
		                ywd[i] += 10;
		                h3 = true;
		                break;
		            }
		        }
		        for(int j = 1; j <= qail; j++){
		            if(qaix[j] == ywx[i] && qaiy[j] == ywy[i]){
		                ywd[i] += 10;
		                h3 = true;
		                break;
		            }
		        }
		        for(int j = 1; j <= dll; j++){
		        	if(dlx[j] == ywx[i] && dly[j] == ywy[i]){
		                ywd[i] += 10;
		                h3 = true;
		                break;
		            }
				}
				for(int j = 1; j <= kual; j++){
		        	if(kuax[j] == ywx[i] && kuay[j] == ywy[i]){
		                ywd[i] += 10;
		                h3 = true;
		                break;
		            }
				}
		        if(h3){
		        	continue;
				}
                yw2[i] = true;
                maze[ywx[i]][ywy[i]] = 2000 + i;
                output(ywx[i], ywy[i]);
                break;
            }
        }
        for(int i = 1; i <= azl; i++){
        	if(az1[i]){
				output(azx[i], azy[i]);
        		if(azf[i] == 1){
        			azy[i] -= 2;
				}else if(azf[i] == 2){
					azx[i] -= 1;
				}else if(azf[i] == 3){
					azy[i] += 2;
				}else if(azf[i] == 4){
					azx[i] += 1;
				}
				if(azx[i] <= 2 || azx[i] >= 28){
					az1[i] = false;
				}
				if(azy[i] <= 1 || azy[i] >= 70){
					az1[i] = false;
				}
				if(azx[i] == b1 && azy[i] == b2){
					bx -= 10;
					az1[i] = false;
				}
				if(!az1[i]){
					continue;
				}
				for(int j = 1; j <= qial; j++){
					if(qiax[j] == azx[i] && qiay[j] == azy[i]){
						az1[i] = false;
						break;
					}
				}
				for(int j = 1; j <= kual; j++){
					if(kuax[j] == azx[i] && kuay[j] == azy[i]){
						az1[i] = false;
						block(kuay[j], kuax[j]);
						color(15);
						cout << "  ";
						maze[kuax[j]][kuay[j]] = 0;
						kuax[j] = kuax[kual];
						kuay[j] = kuay[kual];
						maze[kuax[j]][kuay[j]] = 5000 + j;
						kuax[kual] = kuay[kual] = 0;
						kual--;
						break;
					}
				}
				if(az1[i]){
        			color(11);
        			block(azy[i], azx[i]);
        			cout << "·";
				}
			}
		}
		for(int i = 1; i <= bzl; i++){
        	if(bz1[i]){
        		output(bzx[i], bzy[i]);
        		if(bzf[i] == 1){
        			bzy[i] -= 2;
				}else if(bzf[i] == 2){
					bzx[i] -= 1;
				}else if(bzf[i] == 3){
					bzy[i] += 2;
				}else if(bzf[i] == 4){
					bzx[i] += 1;
				}
				if(bzx[i] <= 2 || bzx[i] >= 28){
					bz1[i] = false;
				}
				if(bzy[i] <= 1 || bzy[i] >= 70){
					bz1[i] = false;
				}
				if(bzx[i] == a1 && bzy[i] == a2){
					ax -= 10;
					bz1[i] = false;
				}
				if(!bz1[i]){
					continue;
				}
				for(int j = 1; j <= qial; j++){
					if(qiax[j] == bzx[i] && qiay[j] == bzy[i]){
						bz1[i] = false;
						break;
					}
				}
				for(int j = 1; j <= kual; j++){
					if(kuax[j] == bzx[i] && kuay[j] == bzy[i]){
						bz1[i] = false;
						block(kuay[j], kuax[j]);
						color(15);
						cout << "  ";
						maze[kuax[j]][kuay[j]] = 0;
						kuax[j] = kuay[j] = 0;
						break;
					}
				}
				if(bz1[i]){
	        		color(14);
	        		block(bzy[i], bzx[i]);
	        		cout << "·";
				}
			}
		}
        if(!qiah && summ % 31 == 2 && shcha <= 20){
            qial++;
            srand(time(NULL));
            int sui3 = (rand() % (shcha + 40 * dy)) + 1;
            qiax[qial] = sui3 % dx + 4;
            qiay[qial] = sui3 / 40 % dy * 2 + 8;
            if(qiax[qial] == a1 && qiay[qial] == a2){
                qiax[qial]++;
            }
            if(qiax[qial] == b1 && qiay[qial] == b2){
                qiay[qial]++;
            }
            if(qiax[qial] == a1 && qiay[qial] == a2){
                qiax[qial]++;
                qiay[qial]++;
            }
            block(qiay[qial], qiax[qial]);
            color(8 * 16 + 8);
            cout << "  ";
            maze[qiax[qial]][qiay[qial]] = 3000 + qial;
            shcha += 13;
        }
        
        if(!qaih && summ % 29 == 1 && shcha <= 20){
        	qail++;
            srand(time(NULL));
            int sui4 = (rand() % (shcha + 40 * dy)) + 1;
            shcha += 14;
            qaix[qail] = sui4 % dx + 4;
            qaiy[qail] = sui4 / 40 % dy * 2 + 8;
            if(qaix[qail] == a1 && qaiy[qail] == a2){
                qaix[qail]++;
            }
            if(qaix[qail] == b1 && qaiy[qail] == b2){
                qaiy[qail]++;
            }
            if(qaix[qail] == a1 && qaiy[qail] == a2){
                qaix[qail]++;
                qaiy[qail]++;
            }
            block(qaiy[qail], qaix[qail]);
            color(3 * 16);
            cout << "·";
            maze[qaix[qail]][qaiy[qail]] = 4000 + qail;
		}
		if(summ % 17 == 11 && shcha <= 43){
            kual++;
            srand(time(NULL));
            int sui3 = (rand() % (shcha + 40 * dy)) + 1;
            kuax[kual] = sui3 % dx + 4;
            kuay[kual] = sui3 / 40 % dy * 2 + 8;
            if(maze[kuax[kual]][kuay[kual]] != 0){
            	kuax[kual] = 0;
            	kuay[kual] = 0;
			}else{
	            if(kuax[kual] == a1 && kuay[kual] == a2){
	                kuax[kual]++;
	            }
	            if(kuax[kual] == b1 && kuay[kual] == b2){
	                kuay[kual]++;
	            }
	            if(kuax[kual] == a1 && kuay[kual] == a2){
	                kuax[kual]++;
	                kuay[kual]++;
	            }
	            block(kuay[kual], kuax[kual]);
	            color(6 * 16 + 6);
	            cout << "  ";
	            maze[kuax[kual]][kuay[kual]] = 5000 + kual;
	            shcha += 7;
	        }
        }
        Sleep(50);
    }
    color(15);
    system("cls");
    if(ax <= 0){
    	color(14);
        cout << "player2";
        color(15);
        cout << " win!" << endl;
        cout << "本游戏由XTW蒟蒻编制" << endl;
    }else{
    	color(11);
        cout << "player1";
        color(15);
        cout << " win!" << endl;
        cout << "本游戏由XTW蒟蒻编制" << endl;
    }
    Sleep(3000);
    system("pause");
    return 0;
}

 

posted on 2026-01-02 17:31  Green_wang  阅读(1)  评论(0)    收藏  举报