收藏 分享(赏)

源代码---推箱子游戏.doc

上传人:gsy285395 文档编号:6318755 上传时间:2019-04-07 格式:DOC 页数:19 大小:50KB
下载 相关 举报
源代码---推箱子游戏.doc_第1页
第1页 / 共19页
源代码---推箱子游戏.doc_第2页
第2页 / 共19页
源代码---推箱子游戏.doc_第3页
第3页 / 共19页
源代码---推箱子游戏.doc_第4页
第4页 / 共19页
源代码---推箱子游戏.doc_第5页
第5页 / 共19页
点击查看更多>>
资源描述

1、/* turbo c 2.0 turbo c 2.0 c turbo c 2.0*/#include #include #include #include #include #include typedef struct winer int x,y; struct winer *p; winer; char status 2020; char far *printScreen=(char far* )0xB8000000; void putoutChar(int y,int x,char ch,char fc,char bc);void printWall(int x, int y);void

2、 printBox(int x, int y);void printBoxDes(int x, int y);void printDestination(int x, int y);void printDestination1(int x,int y,winer *win,winer *pw);void printMan(int x, int y);void init();winer *initStep1();winer *initStep2();winer *initStep3();winer *initStep4();void moveBoxSpacetoSpace(int x ,int

3、y, char a);void moveBoxDestoSpace(int x ,int y, char a) ;void moveBoxSpacetoDes(int x, int y, char a);void moveBoxDestoDes(int x, int y, char a);int judge(int x, int y);void move(int x, int y, char a);void reset(int i);void putoutChar(int y,int x,char ch,char fc,char bc) printScreen(x*160)+(yx=x;(*p

4、w)-y=y;(*pw)-p=NULL; elseqw=(winer* )malloc(sizeof(winer); qw-x=x;qw-y=y;(*pw)-p=qw;(*pw)=qw;qw-p=NULL; void printDestination(int x,int y) putoutChar(y-1,x-1,003,YELLOW,BLACK); statusxy=m; void printMan(int x,int y) gotoxy(y,x); _AL=02;_CX=01;_AH=0xa; geninterrupt(0x10); void printBoxDes(int x,int y

5、) putoutChar(y-1,x-1,10,YELLOW,BLACK); statusxy=i; void init() int i,j; for(i=0;ixpw-y=m)s+; pw=pw-p; if(s=0) free(win); gotoxy(25,2); printf(“congratulate! You have done this step!“); getch(); i+; switch(i) case 1:init();win=initStep2();break;case 2:init(); win=initStep3();break;case 3:init(); win=initStep4();break;case 4:gotoxy(15,21); printf(“Congratulation! n“);gotoxy(15,23);printf(“You have done all the steps, Welcome to play again!“); key=0x011b;getch();break;default:break; while(key!=0x011b); _AL=3; _AH=0; geninterrupt(0x10);

展开阅读全文
相关资源
猜你喜欢
相关搜索

当前位置:首页 > 生活休闲 > 游戏攻略

本站链接:文库   一言   我酷   合作


客服QQ:2549714901微博号:道客多多官方知乎号:道客多多

经营许可证编号: 粤ICP备2021046453号世界地图

道客多多©版权所有2020-2025营业执照举报