- 1、原创力文档(book118)网站文档一经付费(服务费),不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。。
- 2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。如您付费,意味着您自己接受本站规则且自行承担风险,本站不退款、不进行额外附加服务;查看《如何避免下载的几个坑》。如果您已付费下载过本站文档,您可以点击 这里二次下载。
- 3、如文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“版权申诉”(推荐),也可以打举报电话:400-050-0827(电话支持时间:9:00-18:30)。
- 4、该文档为VIP文档,如果想要下载,成为VIP会员后,下载免费。
- 5、成为VIP后,下载本文档将扣除1次下载权益。下载后,不支持退款、换文档。如有疑问请联系我们。
- 6、成为VIP后,您将拥有八大权益,权益包括:VIP文档下载权益、阅读免打扰、文档格式转换、高级专利检索、专属身份标志、高级客服、多端互通、版权登记。
- 7、VIP文档为合作方或网友上传,每下载1次, 网站将根据用户上传文档的质量评分、类型等,对文档贡献者给予高额补贴、流量扶持。如果你也想贡献VIP文档。上传文档
查看更多
#include dos.h
#include stdio.h
#include ctype.h
#include conio.h
#include bios.h
#include alloc.h
typedef struct winer
{
int x,y;
struct winer *p;
}winer;
char status [20][20];
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 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 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)+(y1)+0]=ch;
printScreen[(x*160)+(y1)+1]=(bc*16)+fc;
}
void printWall(int x,int y)
{
putoutChar(y-1,x-1,219,GREEN,BLACK);
status[x][y]=w;
}
void printBox(int x,int y)
{
putoutChar(y-1,x-1,10,WHITE,BLACK);
status[x][y]=b;
}
void printDestination1(int x,int y,winer **win,winer **pw)
{
winer *qw;
putoutChar(y-1,x-1,003,YELLOW,BLACK);
status[x][y]=m;
if(*win==NULL)
{
*win=*pw=qw=(winer* )malloc(sizeof(winer));
(*pw)-x=x;
(*pw)-y=y;
(*pw)-p=NULL;
}
else
{
qw=(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);
status[x][y]=m;
}
void printMan(int x,int y)
{
gotoxy(y,x);
_AL=02;
_CX=01;
_AH=0xa;
geninterrupt(0x10);
}
void printBoxDes(int x,int y)
{
putoutChar(y-1,x-1,10,YELLOW,BLACK);
status[x][y]=i;
}
void init()
{
int i,j;
for(i=0;i20;i++)
fo
您可能关注的文档
最近下载
- 建筑工程图集 11SG814:建筑基坑支护结构构造.pdf VIP
- 电商平台客户投诉处理协调配合措施.docx VIP
- 快速心律失常的急诊处理PPT课件.ppt VIP
- 标准图集-新型城镇化-智能灯杆.pdf VIP
- 11SG814 建筑基坑支护结构图集.docx VIP
- 2024年11月江苏苏州市中医医院(西苑医院苏州医院)招聘编外人员笔试笔试历年专业考点(难、易错点)附带答案详解 .doc
- 广西壮族自治区家庭经济困难学生认定申请表.doc VIP
- 大闽食品(漳州)有限公司企业标准.doc VIP
- 施工企业安全生产事故报告及处理制度.docx VIP
- 电商平台纠纷处理与客服投诉管理方案.docx VIP
文档评论(0)