Devc++双人跑酷小游戏3.0 您所在的位置:网站首页 双人联机跑酷 Devc++双人跑酷小游戏3.0

Devc++双人跑酷小游戏3.0

2023-10-02 04:24| 来源: 网络整理| 查看: 265

终于。。。

双人跑酷小游戏3.0。。。

诞生了!!!

本次解决了闪屏问题

感谢【MCYH0206】

并可以无限玩游戏

上代码!!!

#include #include #include using namespace std; const long long dts=3+1; long long wj1x,wj1y,wj2x,wj2y,cs=0,dtbh,wx1,wy1,wx2,wy2; bool f=1,t1=1,t2=1,sy; long long csx[dts+1]={ 0, 14, 1, 1, 1 }; long long csy[dts+1]={ 0, 1, 37, 1, 1 }; string dt[dts+1][21]={ {}, { "", " ", " ", " == === == ", " === === < ", " == < ", " < ", " == ==^^^^^^^^^^^== < ", " ====== < ", " == === ======= < ", " ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^< ", " == < ", " < ", " == < ", " ^ $", " ========> < = = ", " > < = = ", " = > < = = = ", " ^^^^^ = > === < = == = ", " = =^ = === = ", " < = ^^^^^^^^^^^^^^^ < =$ = ", " < = < = === ", " ^^^< = = ^^^ =^^^^^^^^== = ", " < = = ^^^ ============= = ", " < = === == < = ", " < ======^^^^^^^^^^^^^ ^^^^ ^^ ================ ", " < ", " ^^^^ < == == ", " < = ", " < = == ", " ==== ^^^ = ", " = == ", " ========== ======= ", " ", " " }, { "", " =", " =", " =", " ====^=====^=====^=====^=====^=====^=====^=====^=====^=====^=====^=====^== =", " =", " ===== =", " = =", " ============================== =============================^=", " < ^^^^^^^^^^^^ =", " < == == =", " < = = =", " ^^^ < = = =", " < = = =", " < = = =", " ^^^^< = = =", " < = = =", " < = = =", " = = =", " ============== ===== $=", " =" }, { "", " < =", " < =", " < =", " < =", " < ============================= =", " < = = = = ===================== =", " < == == = $= == = = == =", " < = = = = = = = =", " < = == ^^^^== = == = ===", " < = = = ^^^^^= = = === === =", " < == = =============== = = =", " < = =^^ = = == =", " < = =========================== = === =", " < = = = =", " < ^ =============================== = =", " < => === =", " ==> ===", " ==================================================================== =", " =", " =" } }; void csh() { f=1,t1=1,t2=1; cs=0; return ; } void color(int c) { SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE),c); return ; } void gb() { CONSOLE_CURSOR_INFO cursor; cursor.bVisible=FALSE; cursor.dwSize=sizeof(cursor); HANDLE handle=GetStdHandle(STD_OUTPUT_HANDLE); SetConsoleCursorInfo(handle, &cursor); return ; } void ydgb(int x, int y) { COORD pos = {x,y}; HANDLE hOut = GetStdHandle(STD_OUTPUT_HANDLE);// 获取标准输出设备句柄 SetConsoleCursorPosition(hOut, pos);//两个参数分别是指定哪个窗体,具体位置 return ; } void out(); void in(); void lx(); void js(); void gx(); int main() { system("mode con cols=75 lines=20"); srand(time(0)); while(1) { csh(); dtbh=rand()%dts+1; wj1x=wj2x=csx[dtbh]; wj1y=wj2y=csy[dtbh]; color(240); gb(); system("cls"); out(); while(f) { in(); js(); if(cs==1) lx(); gx(); Sleep(75); if(cs==1)cs=-1; cs++; } system("cls"); if(!sy) { color(9); system("cls"); cout


【本文地址】

公司简介

联系我们

今日新闻

    推荐新闻

    专题文章
      CopyRight 2018-2019 实验室设备网 版权所有