资源简介
用Eclipse开发的迷宫程序,附带界面设计,整个程序可跑起来,可附加设置迷宫难度等级。
代码片段和文件信息
package maze2;
public class Box {
private boolean upWall;
private boolean downWall;
private boolean leftWall;
private boolean rightWall;
private boolean isKeyBox;
private boolean isVisited;
public Box()
{
//4个方向的墙初始化设置为true
upWall = true;
downWall = true;
leftWall = true;
rightWall = true;
//路径设置为false
isKeyBox = false;
}
//下面方法设置是否为墙及返回
public void setUpWall(boolean upWall)
{
this.upWall = upWall;
}
public void setDownWall(boolean downWall)
{
this.downWall = downWall;
}
public void setLeftWall(boolean leftWall)
{
this.leftWall = leftWall;
}
public void setRightWall(boolean rightWall)
{
this.rightWall = rightWall;
}
public void setKeyBox(boolean isKeyBox)
{
this.isKeyBox=isKeyBox;
}
public void setVisited(boolean isVisited)
{
this.isVisited = isVisited;
}
public boolean isUpWall()
{
return upWall;
}
public boolean isDownWall()
{
return downWall;
}
public boolean isLeftWall()
{
return leftWall;
}
public boolean isRightWall()
{
return rightWall;
}
public boolean isKeyBox()
{
return isKeyBox;
}
public boolean isVisited()
{
return isVisited;
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 301 2017-10-24 21:22 maze2\.classpath
文件 381 2017-10-24 21:22 maze2\.project
文件 598 2017-10-24 21:22 maze2\.settings\org.eclipse.jdt.core.prefs
文件 1439 2017-12-29 22:37 maze2\bin\maze2\Box.class
文件 1035 2017-12-29 22:37 maze2\bin\maze2\Canvas$ControlKeyListener.class
文件 6557 2017-12-29 22:37 maze2\bin\maze2\Canvas.class
文件 2266 2017-12-29 22:37 maze2\bin\maze2\ControlPanel.class
文件 1610 2017-12-29 22:37 maze2\bin\maze2\MiGong.class
文件 1244 2017-10-30 11:41 maze2\src\maze2\Box.java
文件 9193 2017-10-30 11:41 maze2\src\maze2\Canvas.java
文件 1936 2017-10-30 11:41 maze2\src\maze2\ControlPanel.java
文件 1178 2017-10-30 11:41 maze2\src\maze2\MiGong.java
目录 0 2017-12-29 22:37 maze2\bin\maze2
目录 0 2017-10-24 21:24 maze2\src\maze2
目录 0 2017-10-24 21:22 maze2\.settings
目录 0 2017-12-29 22:37 maze2\bin
目录 0 2017-10-24 21:22 maze2\src
目录 0 2017-10-24 21:22 maze2
----------- --------- ---------- ----- ----
27738 18
评论
共有 条评论