全部评论 1

  • #include<bits/stdc++.h>
    #include<Windows.h>
    #define PR_Box printf("■")
    #define PR_Gold printf("★")
    #define PR_Ag printf("☆")
    #define PR_FBird printf("Ю")
    #define PR_DBird printf("Ф")
    #define PR_Land printf("┳┳┯")
    #define PR_Bg_TL printf("╔")
    #define PR_Bg_TR printf("╗")
    #define PR_Bg_DL printf("╚")
    #define PR_Bg_DR printf("╝")
    #define PR_Bg_X printf("═")
    #define PR_Bg_Y printf("║")
    #define PR_Blank printf(" ");
    int Grade=1,C_Gold=0,C_Ag=0,Score=0,Delay_time=1000,Max_blank=9,Distance=18;
    struct Birds {
    int x,y;
    int condition;
    };
    BirdsBird=(Birds)malloc(sizeof(Birds));
    struct Bg {
    int x,y;
    int l_blank;
    int reward[9];
    Bgpri;
    Bg
    next;
    };
    BgBg1=new Bg[sizeof(Bg)];
    void Position(int x,int y) {
    COORD pos= {x-1,y-1};
    HANDLE Out=GetStdHandle(STD_OUTPUT_HANDLE);
    SetConsoleCursorPosition(Out,pos);
    }
    void CreatBird() {
    Bird->x=41;
    Bird->y=10;
    Bird->condition=0;
    }
    void CreatBg() {
    Bg
    Bg2=(Bg*)malloc(sizeof(Bg));
    Bg1->x=90;
    Bg1->y=8;
    Bg2->x=Bg1->x+Distance;
    Bg2->y=9;
    Bg1->l_blank=Max_blank-Grade;
    Bg2->l_blank=Max_blank-Grade;
    Bg1->next=Bg2;
    Bg1->pri=Bg2;
    Bg2->next=Bg1;
    Bg2->pri=Bg1;
    }
    void InsertBg(Bgp) {
    int temp;
    Bg
    Bgs=(Bg*)malloc(sizeof(Bg));
    Bgs->x=p->pri->x+Distance;
    Bgs->l_blank=Max_blank-Grade;
    srand((int)time(0));
    temp=rand();
    if(temp%20) {
    if((temp%4+p->pri->y+Max_blank-Grade)<21)Bgs->y=p->pri->y+temp%4;
    else Bgs->y=p->pri->y;
    } else {
    if((p->pri->y-temp%4)>2)Bgs->y=p->pri->y-temp%4;
    else Bgs->y=p->pri->y;
    }
    Bgs->pri=p->pri;
    Bgs->next=p;
    p->pri->next=Bgs;
    p->pri=Bgs;
    }
    void Check_Bg(Bgq) {
    Bg
    p=q;
    int i=0,temp;
    while(++i<=5) {
    if(p->x>-4)p=p->next;
    else {
    srand((int)time(0));
    temp=rand();
    if(temp%2
    0) {
    if((temp%4+p->y+Max_blank-Grade)<21)p->y=p->y+temp%4;
    else p->y=p->y;
    p->x=p->pri->x+Distance;
    p->l_blank=Max_blank-Grade;
    } else {
    if((p->y-temp%4)>2)p->y=p->y-temp%4;
    else p->y=p->y;
    p->x=p->pri->x+Distance;
    p->l_blank=Max_blank-Grade;
    }
    }
    }
    }
    void Loop_Bg(Bg*

    2024-07-30 来自 北京

    0

热门讨论