c语言推箱子 把下面的一个关卡的推箱子游戏改成多关游戏环境(wintc)

来源:百度知道 编辑:UC知道 时间:2024/07/04 09:50:34
代码如下:
#include <stdio.h>
#include <bios.h>
#include <conio.h>

#define ESC 0x011b
#define UP 0x4800
#define DOWN 0x5000
#define LEFT 0x4b00
#define RIGHT 0x4d00

#define MAXSIZE 10

typedef struct
{
int x;
int y;
}point;

point des[MAXSIZE];

char map1[10][10] =
{
" ",
" ####",
" ### @#",
" # b #",
" ## # ###",
" # # #*#",
" # # b*#",
" # b *#",
" ########",
" "
};
char map2[10][10] =
{
" ",
" ####",
" ### @#",
" # b #",
" ## # ###",
" # # #*#",
" # # b*#",
" #

有时间,一定会看,我在做俄罗斯方块,用的是BCC编译器。。

void DrawDes(int x, int y)
{
gotoxy(x+10, y+5);
textcolor(YELLOW);
putch('*');
}

void DrawBoxIn(int x, int y)