public void paint( Level level ) { final int floor = Terrain.EMPTY_SP; Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, floor ); boolean honeyPot = Random.Int( 2 ) == 0; int n = Random.IntRange( 3, 4 ); for (int i=0; i < n; i++) { int pos; do { pos = level.pointToCell(random()); } while (level.map[pos] != floor); if (honeyPot){ level.drop( new Honeypot(), pos); honeyPot = false; } else level.drop( prize( level ), pos ); } entrance().set( Door.Type.BARRICADE ); level.addItemToSpawn( new PotionOfLiquidFlame() ); }
public void paint( Level level ) { final int floor = Terrain.EMPTY_SP; Painter.fill( level, this, Terrain.WALL ); Painter.fill( level, this, 1, floor ); boolean honeyPot = Random.Int( 2 ) == 0; int n = Random.IntRange( 3, 4 ); for (int i=0; i < n; i++) { int pos; do { pos = level.pointToCell(random()); } while (level.map[pos] != floor); if (honeyPot){ level.drop( new Honeypot(), pos); honeyPot = false; } else level.drop( prize( level ), pos ); } entrance().set( Door.Type.BARRICADE ); level.addItemToSpawn( new PotionOfLiquidFlame() ); }