#include#include#include#include#include#include/*定义二维数组ghouse来记录屏幕上各点的状态,其中:0表示什么都没有,''b''表示箱子,''w''表示墙壁,''m''表示目的地,''i''表示箱子在目的地。charghouse=0;_AL=3;_AH=0;geninterrupt0x10;gotoxy40,4;printf"Welcometopushboxworld!";gotoxy40,6;printf"Pressup,down,left,righttoplay.";gotoxy40,8;printf"PressEsctoquitit.";gotoxy40,10;printf"Pressspacetoresetthegame.";gotoxy40,12;printf"April30th2004.";}/*第一关的图象初始化*/winer*inithouse1{intx,y;winer*win=NULL,*pw;gotoxy8,2;printf"LevelNo.1";forx=1,y=5;y<=9;y++printwallx+4,y+10;fory=5,x=2;x<=5;x++printwallx+4,y+10;fory=9,x=2;x<=5;x++printwallx+4,y+10;fory=1,x=3;x<=8;x++printwallx+4,y+10;forx=3,y=3;x<=5;x++printwallx+4,y+10;forx=5,y=8;x<=9;x++printwallx+4,y+10;forx=7,y=4;x<=9;x++printwallx+4,y+10;forx=9,y=5;y<=7;y++printwallx+4,y+10;forx=8,y=2;y<=3;y++printwallx+4,y+10;printwall5+4,4+10;printwall5+4,7+10;printwall3+4,2+10;printbox3+4,6+10;printbox3+4,7+10;printbox4+4,7+10;printwhither14+4,2+10,&win,&pw;printwhither15+4,2+10,&win,&pw;printwhither16+4,2+10,&win,&pw;printman2+4,8+10;returnwin;。
赵魁义2020-01-17 17:00:09