#include<iostream>
#include<windows.h>
#include<stdlib.h>
#include<conio.h>
#include<fstream>
#include<iomanip>
using namespace std;
const int roomsize = 9;//设计房子内部为正方形,边长为9
int map[roomsize + 2][roomsize + 2]; //推箱子房子布局的数据结构:二维数组
int followmap[1000];
int data;//记录最短步骤数目
int times = 0;
int array[2] = { 100, 100 }; //记录最好成绩
char String[30] = "开始比赛...........";
//以下为前几轮游戏房子中细节布局的数据结构:二维数组的实际内容
int map1[roomsize + 2][roomsize + 2] =
{ //0,1,2,3,4,5,6,7,8,9,10
{ -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1 }, //0
{ -1, 0, 0, 0, 0, 1, 1, 1, 1, 1, -1 }, //1
{ -1, 0, 0, 0, 0, 1, 2, 0, 0, 1, -1 }, //2
{ -1, 1, 1, 1, 0, 1, 0, 3, 0, 1, -1 }, //3
{ -1, 1, 2, 1, 0, 1, 0, 0, 0, 1, -1 }, //4
{ -
C++ 推箱子
最新推荐文章于 2025-06-06 14:06:36 发布