1: 2: package maze; 3: 4: public interface MazeBuilder { 5: 6: /** 7: * Start to build a new Maze 8: */ 9: public void newMaze(); 10: 11: /** 12: * Fetch the Maze that have been built. 13: */ 14: public Maze getMaze(); 15: 16: /** 17: * Build a new room in the current Maze. 18: */ 19: public void buildRoom(int roomNumber); 20: 21: /** 22: * Build a new door in the current Maze between two the specified rooms. 23: * 24: * @param roomNumber1 specifies the room number of the first room 25: * @param roomNumber2 specifies the room number of the second room 26: * @param dir specifies the side of the first room at which the door will be located 27: * the second room will be on the other side of the door. 28: * @param open whether the door is open or not 29: */ 30: public void buildDoor(int roomNumber1, int roomNumber2, 31: Direction dir, boolean open); 32: 33: }