ConnectionRoom t = r instanceof SecretRoom ? new MazeConnectionRoom() : ConnectionRoom.createRoom(); tries = 3; t.clearConnections(); for (Room c : connectingRoomsThisBranch){ c.clearConnections();
@Override public void paint(Level level) { super.paint(level); Painter.fill(level, this, 1, Terrain.EMPTY); //true = space, false = wall boolean[][] maze = Maze.generate(this); Painter.fill(level, this, 1, Terrain.EMPTY); for (int x = 0; x < maze.length; x++) for (int y = 0; y < maze[0].length; y++) { if (maze[x][y] == Maze.FILLED) { Painter.fill(level, x + left, y + top, 1, 1, Terrain.WALL); } } for (Door door : connected.values()) { door.set( Door.Type.HIDDEN ); } }
loop.add(ConnectionRoom.createRoom()); ConnectionRoom c = ConnectionRoom.createRoom(); if (placeRoom(loop, prev, c, angleBetweenRooms(prev, entrance)) == -1){ return null;
loop.add(ConnectionRoom.createRoom()); ConnectionRoom c = ConnectionRoom.createRoom(); if (placeRoom(loop, prev, c, angleBetweenRooms(prev, entrance)) == -1){ return null;
ConnectionRoom t = r instanceof SecretRoom ? new MazeConnectionRoom() : ConnectionRoom.createRoom(); tries = 3; t.clearConnections(); for (Room c : connectingRoomsThisBranch){ c.clearConnections();
ConnectionRoom t = ConnectionRoom.createRoom(); placeRoom(rooms, curr, t, direction + Random.Float(-pathVariance, pathVariance)); branchable.add(t);
@Override public void paint(Level level) { super.paint(level); Painter.fill(level, this, 1, Terrain.EMPTY); //true = space, false = wall boolean[][] maze = Maze.generate(this); Painter.fill(level, this, 1, Terrain.EMPTY); for (int x = 0; x < maze.length; x++) for (int y = 0; y < maze[0].length; y++) { if (maze[x][y] == Maze.FILLED) { Painter.fill(level, x + left, y + top, 1, 1, Terrain.WALL); } } for (Door door : connected.values()) { door.set( Door.Type.HIDDEN ); } }
ConnectionRoom t = ConnectionRoom.createRoom(); placeRoom(rooms, curr, t, direction + Random.Float(-pathVariance, pathVariance)); branchable.add(t);