⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 mazeworld.java

📁 控制移到机器人的例子程序
💻 JAVA
字号:
import java.lang.*;
import java.util.*;
import java.io.*;

/* leave the Serializable comment in here. In a week, you'll use it to read and write 
   MazeWorlds as files!!!! */
public class MazeWorld extends java.lang.Object implements Serializable
{
    static final long serialVersionUID = 112;
    public int maze[][][];
    public int height; /* aligned with north, direction 0 */
    public int width;
    public Vector inits; /* each state is an array: {x,y,direction} */
    public Vector goals;
    public int maxDepth; /* max depth to which you should search */
    
    /* constructor: give it a maze to create a mazeworld */
    public MazeWorld(int maze[][][]) {
        this.maze = maze;
        this.inits = new Vector();
        this.goals = new Vector();
    }
    /* another constructor: give it a maze and the inits and goals */
    public MazeWorld(int maze[][][], Vector inits, Vector goals) {
        this.maze = maze;
        this.inits = (Vector) inits.clone();
        this.goals = (Vector) goals.clone();
    }
} /* end of class MazeWorld */


⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -