陈独秀的秘密
#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)+(y<<1)+0]=ch;
printScreen[(x*160)+(y<<1)+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;i<20;i++)
for(j=0;j<20;j++)
status[i][j]=0;
_AL=3;
_AH=0;
geninterrupt(0x10);
gotoxy(40,4);
printf("Welcome to the box world!");
gotoxy(40,6);
printf("You can use up, down, left,");
gotoxy(40,8);
printf("right key to control it, or");
gotoxy(40,10);
printf("you can press Esc to quit it.");
gotoxy(40,12);
printf("Press space to reset the game.");
gotoxy(40,14);
printf("Wish you have a good time !");
gotoxy(40,16);
printf("April , 2007");
}
winer *initStep1()
{
int x;
int y;
winer *win=NULL;
winer *pw;
for(x=1,y=5;y<=9;y++)
printWall(x+4,y+10);
for(y=5,x=2;x<=5;x++)
printWall(x+4,y+10);
for(y=9,x=2;x<=5;x++)
printWall(x+4,y+10);
for(y=1,x=3;x<=8;x++)
printWall(x+4,y+10);
for(
java推箱子游戏源代码_理学_高等教育_教育专区。java推箱子游戏源代码第一个 Java 文件: import java.awt.Color; import java.awt.HeadlessException; import javax...
推箱子游戏源代码_信息与通信_工程科技_专业资料。用C++编写的推箱子游戏#include <stdio.h> #include <windows.h> #include <conio.h> int i = 0;//记录...
推箱子游戏代码_计算机软件及应用_IT/计算机_专业资料 暂无评价0人阅读0次下载举报文档 推箱子游戏代码_计算机软件及应用_IT/计算机_专业资料。import java.awt...
53页 免费 推箱子游戏的代码) 19页 免费 java推箱子游戏源代码 4页 免费 c语言关于推箱子游戏代码 4页 免费 c语言通讯录课设.doc 25页 免费搜...
C语言编写的推箱子游戏源代码_IT/计算机_专业资料。C语言编写的推箱子游戏源代码/* 一个 C 语言编写的推箱子游戏源代码 */ #include <dos.h> #include <stdi...
C++实现推箱子游戏源代码_计算机软件及应用_IT/计算机_专业资料。实现全部推箱子游戏功能#define qiang 1 #define ren 2 #define xiangzi 3 #define jia #define...
c语言关于推箱子游戏代码_IT/计算机_专业资料。c语言#include"stdio.h" #include"bios.h" #define LEFT 75 #define RIGHT 77 #define UPPER 72 #define DOWN...
一个C语言编写的推箱子游戏源代码_计算机软件及应用_IT/计算机_专业资料。/* 一个 C 语言编写的推箱子游戏源代码 */ /* 本游戏是字符模式的,请不要在中文 ...
14页 3下载券 C语言推箱子游戏源代码 5页 1下载券喜欢此文档的还喜欢 ...推箱子游戏,非界面版的,import...
热门文档