rescuecore.tools.mapgenerator
Class BasicBuildingGenerator
java.lang.Object
rescuecore.tools.mapgenerator.BlocksBuildingGenerator
rescuecore.tools.mapgenerator.BasicBuildingGenerator
- All Implemented Interfaces:
- BuildingGenerator
- public class BasicBuildingGenerator
- extends BlocksBuildingGenerator
A BuildingGenerator that recursively chops a block into rectangular buildings.
|
Method Summary |
protected int[][][] |
fillBlock(RescueMap rm,
int[] block,
int density,
java.util.Random rand)
Divides a block into a number of rectangular buildings. |
protected int[][][] |
fillOuterBlock(RescueMap rm,
int[] block,
int density,
java.util.Random rand)
No buildings returned - just have an empty outer rim. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BasicBuildingGenerator
public BasicBuildingGenerator()
fillBlock
protected int[][][] fillBlock(RescueMap rm,
int[] block,
int density,
java.util.Random rand)
- Divides a block into a number of rectangular buildings.
- Specified by:
fillBlock in class BlocksBuildingGenerator
- Parameters:
rm - The RescueMap containing the block.block - A list of nodes in anti-clockwise order around the block.density - The density of buildings to add.rand - The random number generator.
- Returns:
- Buildings to add as an array of form [building][apex][coordinate]
fillOuterBlock
protected int[][][] fillOuterBlock(RescueMap rm,
int[] block,
int density,
java.util.Random rand)
- No buildings returned - just have an empty outer rim.
- Specified by:
fillOuterBlock in class BlocksBuildingGenerator
- Parameters:
rm - The RescueMap containing the block.block - A list of nodes in anti-clockwise order around the block.density - The density of buildings to add.rand - The random number generator.
- Returns:
- Buildings to add as an array of form [building][apex][coordinate]