地图存储类
来源:互联网 发布:好用的linux系统 编辑:程序博客网 时间:2024/05/22 15:15
package maze.eng;
public class manage
{
int date = 0;
char[][] theDate;
int x;
int y;
public manage(int theCount)
{
date = theCount;
theDate = new char[date][date];
for(int i = 0; i < date; i++)
{
for(int j = 0; j < date; j++)
{
theDate[i][j] = '1';
}
}
}
public void setManage(int xNum, int yNum, char theIn)
{
theDate[xNum - 1][yNum - 1] = theIn;
}
public char getManage(int xNum, int yNum)
{
return theDate[xNum - 1][yNum - 1];
}
boolean judgeBuild(int xNum, int yNum)
{
int count = 0;
if(xNum == 1 || yNum == 1 || xNum == date || yNum == date)
{
return false;
}
if(theDate[xNum - 2][yNum - 1] == '2')
{
count++;
}
if(theDate[xNum][yNum - 1] == '2')
{
count++;
}
if(theDate[xNum - 1][yNum - 2] == '2')
{
count++;
}
if(theDate[xNum - 1][yNum] == '2')
{
count++;
}
if(count < 2)
{
return true;
}
else
{
return false;
}
}
int judgeGo(int xNum, int yNum)
{
if(theDate[xNum - 1][yNum - 1] == '1')
{
return -1;
}
else if(theDate[xNum - 1][yNum - 1] == '4')
{
return 1;
}
else
{
return 0;
}
}
public int getX()
{
return x;
}
public int getY()
{
return y;
}
public void setX(int xIn)
{
x = xIn;
}
public void setY(int yIn)
{
y = yIn;
}
public void renew()
{
for(int i = 0; i < date; i++)
{
for(int j = 0; j < date; j++)
{
theDate[i][j] = '1';
}
}
}
}
- 地图存储类
- 游戏地图编辑器之地图存储格式
- 百度地图API 云存储·LBS.云 VO类封装(Java)
- 百度地图API 云存储·LBS.云 工具类封装(Java)
- 基于云存储的个性化地图-李乐
- 地图上2不同区域内的路网存储过程
- 导航地图数据中道路拓扑网络的物理存储
- 百度地图LBS云存储自定义poi热点
- 地图生成父类
- Lua地图类
- 百度地图覆盖类
- COCOS-Tiled地图类
- 百度地图工具类
- 地图工具类
- 地图
- 地图
- 地图
- 地图
- 基于广度优先算法迷宫生成类
- Oracle Develop OpenWorld 2008 印象
- Subversion在Linux系统的安装步骤
- 跨站式SQL注入技巧
- 归档文件大小的设置
- 地图存储类
- 开始规划
- 防范Sql注入式攻击
- 广度优先算法链表节点类
- 浮尘
- 送走朋友。。。
- Protel DXP2004 破解版下载
- Dreamweaver中sql注入式攻击的防范
- JDK中http协议下载文件简单示例