C语言、VS2013平台实现推箱子小游戏,包含对txt文件打开关闭的基本操作,使用线性表实现栈的原理实现悔步功能,键盘响应运动。。。
代码说明:
#include //用于输入输出#include //用于system#include //getchar函数#include#include #define STACK_SIZE 1000 //栈容量#define STACK_IN 20 //每次入栈容量//0:空地,1:墙,3:箱子目的地,4:箱子,6:人,7:箱子与目的地重合,9:人在箱子的目的地//初始化当前关的地图int g_level_map[11][12] ={ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }};
下载说明:请别用迅雷下载,失败请重下,重下不扣分!