@Override public void paint(Level level) { Painter.fill( level, this, Terrain.WALL ); Painter.fillEllipse( level, this, 1 , Terrain.EMPTY ); for (Door door : connected.values()) { door.set( Door.Type.REGULAR ); if (door.x == left || door.x == right){ Painter.drawInside(level, this, door, width()/2, Terrain.EMPTY); } else { Painter.drawInside(level, this, door, height()/2, Terrain.EMPTY); } } Painter.fillEllipse( level, this, 3 , Terrain.CHASM ); } }
@Override public void paint(Level level) { Painter.fill( level, this, Terrain.WALL ); Painter.fillEllipse( level, this, 1 , Terrain.EMPTY ); for (Door door : connected.values()) { door.set( Door.Type.REGULAR ); if (door.x == left || door.x == right){ Painter.drawInside(level, this, door, width()/2, Terrain.EMPTY); } else { Painter.drawInside(level, this, door, height()/2, Terrain.EMPTY); } } Painter.fillEllipse( level, this, 3 , Terrain.CHASM ); } }
@Override public void paint(Level level) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.CHASM ); ArrayList<Rect> platforms = new ArrayList<>(); splitPlatforms( new Rect(left+2, top+2, right-2, bottom-2), platforms); for (Rect platform : platforms){ Painter.fill( level, platform.left, platform.top, platform.width()+1, platform.height()+1, Terrain.EMPTY_SP); } for (Door door : connected.values()) { door.set( Door.Type.REGULAR ); Painter.drawInside(level, this, door, 2, Terrain.EMPTY_SP); } }
@Override public void paint(Level level) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.CHASM ); ArrayList<Rect> platforms = new ArrayList<>(); splitPlatforms( new Rect(left+2, top+2, right-2, bottom-2), platforms); for (Rect platform : platforms){ Painter.fill( level, platform.left, platform.top, platform.width()+1, platform.height()+1, Terrain.EMPTY_SP); } for (Door door : connected.values()) { door.set( Door.Type.REGULAR ); Painter.drawInside(level, this, door, 2, Terrain.EMPTY_SP); } }
Door door = entrance(); if (door.x == left || door.x == right) { Point p = Painter.drawInside( level, this, door, Math.abs( door.x - c.x ) - 2, Terrain.EMPTY_SP ); for (; p.y != c.y; p.y += p.y < c.y ? +1 : -1) { Painter.set( level, p, Terrain.EMPTY_SP ); Point p = Painter.drawInside( level, this, door, Math.abs( door.y - c.y ) - 2, Terrain.EMPTY_SP ); for (; p.x != c.x; p.x += p.x < c.x ? +1 : -1) { Painter.set( level, p, Terrain.EMPTY_SP );
Door door = entrance(); if (door.x == left || door.x == right) { Point p = Painter.drawInside( level, this, door, Math.abs( door.x - c.x ) - 2, Terrain.EMPTY_SP ); for (; p.y != c.y; p.y += p.y < c.y ? +1 : -1) { Painter.set( level, p, Terrain.EMPTY_SP ); Point p = Painter.drawInside( level, this, door, Math.abs( door.y - c.y ) - 2, Terrain.EMPTY_SP ); for (; p.x != c.x; p.x += p.x < c.x ? +1 : -1) { Painter.set( level, p, Terrain.EMPTY_SP );
Painter.drawInside(level, this, entrance, (width() - 3) / 2, Terrain.EMPTY_SP); } else { Painter.drawInside(level, this, entrance, (height() - 3) / 2, Terrain.EMPTY_SP);
Painter.drawInside(level, this, entrance, (width() - 3) / 2, Terrain.EMPTY_SP); } else { Painter.drawInside(level, this, entrance, (height() - 3) / 2, Terrain.EMPTY_SP);
door.set( Door.Type.REGULAR ); if (door.x == left || door.x == right){ Painter.drawInside(level, this, door, (width() - 3) / 2, Terrain.EMPTY); } else { Painter.drawInside(level, this, door, (height() - 3) / 2, Terrain.EMPTY);
door.set( Door.Type.REGULAR ); if (door.x == left || door.x == right){ Painter.drawInside(level, this, door, (width() - 3) / 2, Terrain.EMPTY); } else { Painter.drawInside(level, this, door, (height() - 3) / 2, Terrain.EMPTY);
Painter.drawInside( level, this, new Point( left, i ), Random.IntRange( 1, width() - 4 ), Terrain.EMPTY_SP ); Painter.drawInside( level, this, new Point( right, i ), Random.IntRange( 1, width() - 4 ), Terrain.EMPTY_SP ); Painter.drawInside( level, this, new Point( i, top ), Random.IntRange( 1, height() - 4 ), Terrain.EMPTY_SP ); Painter.drawInside( level, this, new Point( i, bottom ), Random.IntRange( 1, height() - 4 ), Terrain.EMPTY_SP );
Painter.drawInside( level, this, new Point( left, i ), Random.IntRange( 1, width() - 4 ), Terrain.EMPTY_SP ); Painter.drawInside( level, this, new Point( right, i ), Random.IntRange( 1, width() - 4 ), Terrain.EMPTY_SP ); Painter.drawInside( level, this, new Point( i, top ), Random.IntRange( 1, height() - 4 ), Terrain.EMPTY_SP ); Painter.drawInside( level, this, new Point( i, bottom ), Random.IntRange( 1, height() - 4 ), Terrain.EMPTY_SP );
Painter.drawInside( level, this, door, 1, Terrain.EMPTY );
Painter.drawInside( level, this, door, 1, Terrain.EMPTY );
@Override public void paint( Level level) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.CHASM ); Painter.drawInside( level, this, entrance(), 2, Terrain.EMPTY_SP); Painter.fill( level, this, 2, Terrain.EMPTY ); int n = Random.NormalIntRange(2, 3); int dropPos; for (int i = 0; i < n; i++) { do { dropPos = level.pointToCell(random()); } while (level.map[dropPos] != Terrain.EMPTY); level.drop(prize(level), dropPos); } entrance().set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) ); }
@Override public void paint( Level level) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.CHASM ); Painter.drawInside( level, this, entrance(), 2, Terrain.EMPTY_SP); Painter.fill( level, this, 2, Terrain.EMPTY ); int n = Random.NormalIntRange(2, 3); int dropPos; for (int i = 0; i < n; i++) { do { dropPos = level.pointToCell(random()); } while (level.map[dropPos] != Terrain.EMPTY); level.drop(prize(level), dropPos); } entrance().set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) ); }
public void paint( Level level ) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.EMPTY_SP ); Door entrance = entrance(); Painter.fill( level, left + 1, top+1, width() - 2, 1 , Terrain.BOOKSHELF ); Painter.drawInside(level, this, entrance, 1, Terrain.EMPTY_SP ); int n = Random.IntRange( 2, 3 ); for (int i=0; i < n; i++) { int pos; do { pos = level.pointToCell(random()); } while (level.map[pos] != Terrain.EMPTY_SP || level.heaps.get( pos ) != null); Item item; if (i == 0) item = Random.Int(2) == 0 ? new ScrollOfIdentify() : new ScrollOfRemoveCurse(); else item = prize( level ); level.drop( item, pos ); } entrance.set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) ); }
public void paint( Level level ) { Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, Terrain.EMPTY_SP ); Door entrance = entrance(); Painter.fill( level, left + 1, top+1, width() - 2, 1 , Terrain.BOOKSHELF ); Painter.drawInside(level, this, entrance, 1, Terrain.EMPTY_SP ); int n = Random.IntRange( 2, 3 ); for (int i=0; i < n; i++) { int pos; do { pos = level.pointToCell(random()); } while (level.map[pos] != Terrain.EMPTY_SP || level.heaps.get( pos ) != null); Item item; if (i == 0) item = Random.Int(2) == 0 ? new ScrollOfIdentify() : new ScrollOfRemoveCurse(); else item = prize( level ); level.drop( item, pos ); } entrance.set( Door.Type.LOCKED ); level.addItemToSpawn( new IronKey( Dungeon.depth ) ); }
Painter.drawInside(level, this, door, 2, Terrain.EMPTY_SP); door.set( Door.Type.REGULAR );
Painter.drawInside(level, this, door, 2, Terrain.EMPTY_SP); door.set( Door.Type.REGULAR );