wall.java

来自「一个用JAVA语言编写的迷宫程序,可以实现迷宫的行走」· Java 代码 · 共 50 行

JAVA
50
字号
/**
 * 
 */
package org.freemind.maze2d;

/**
 * @author Jerric
 * @created Feb 9, 2006
 */
public class Wall {

    private RoomNode roomA;
    private RoomNode roomB;
    private boolean isEastWest;

    /**
     * If the isEastWest is true, the roomA is on the west, and roomB on the
     * east; if it's false, the roomA is on the north, and roomB on the south.
     * 
     * @param roomA
     * @param roomB
     * @param isEastWest
     */
    public Wall(RoomNode roomA, RoomNode roomB, boolean isEastWest) {
        this.roomA = roomA;
        this.roomB = roomB;
        this.isEastWest = isEastWest;
    }

    /**
     * @return Returns the isEastWest.
     */
    public boolean isEastWest() {
        return this.isEastWest;
    }

    /**
     * @return Returns the roomA.
     */
    public RoomNode getRoomA() {
        return this.roomA;
    }

    /**
     * @return Returns the roomB.
     */
    public RoomNode getRoomB() {
        return this.roomB;
    }
}

⌨️ 快捷键说明

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