IDungeon dungeon, Room room) {
g.setColor(Color.BLACK);
for (Edge edge: room.getEdges()) {
Room nextRoom = dungeon.get(edge.getTargetRoomId());
Coords coords = room.getCenter(),
nextCoords = nextRoom.getCenter();
if (nextRoom.getParent() == room) {
drawParentEdge(g, scale, roomSize, room, nextRoom);
}
double x1 = coords.x*scale + roomSize*scale,
y1 = coords.y*scale + roomSize*scale,
x2 = nextCoords.x*scale + roomSize*scale,
y2 = nextCoords.y*scale + roomSize*scale;
double sdy = Math.signum(y2-y1), sdx = Math.signum(x2-x1);
y1 += sdy * scale*roomSize/2;
y2 -= sdy * scale*roomSize/2;
x1 += sdx * scale*roomSize/2;
x2 -= sdx * scale*roomSize/2;
if (nextRoom != null && Symbol.equals(edge.getSymbol(),
nextRoom.getEdge(room.id).getSymbol())) {
// Bidirectional edge
// avoid drawing twice:
if (coords.compareTo(nextCoords) > 0) continue;
g.drawLine((int)x1, (int)y1, (int)x2, (int)y2);
double midx = (x1+x2)/2,
midy = (y1+y2)/2;