![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
游戏开发
「已注销」
这个作者很懒,什么都没留下…
展开
-
推箱子(C++类实现)
直接上代码 #include <iostream> #include <fstream> #include <algorithm> using namespace std; // 从文件中获取数据 void readFile(char** buffer, int* size, const char* filename) { //ifstream in(filename, ios::binary); ifstream in(filename); if (!in)原创 2021-07-15 17:17:03 · 422 阅读 · 1 评论 -
游戏入门-推箱子(初级版)
上代码 #include <iostream> using namespace std; const char gStateData[] = "\ ########\n\ # .. p #\n\ # oo #\n\ # #\n\ ########"; const int gStateWidth = 8; const int gStateHeight = 5; enum Object { OBJ_SPACE, OBJ_WALL, OBJ_GOAL, OBJ_BLOCK,原创 2021-07-07 18:30:20 · 253 阅读 · 0 评论