|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.adom.jade.world.maps.AreaCreator
Creates a defined number of areas of a specific type with predefined restrictions on their width and height. This class is used as a factory to fill maps with specific areas (e.g. rooms or buildings).
| Constructor Summary | |
|---|---|
AreaCreator(java.lang.String widthDiceString,
java.lang.String heightDiceString,
int count)
Defines an area creator for a number of areas. |
|
| Method Summary | |
|---|---|
Area |
createArea(Map map)
Tries to create a new area. |
protected abstract Area |
createAreaImpl(int x1,
int y1,
int x2,
int y2)
Creates a new area. |
boolean |
hasMoreAreas()
Determines if this creator has areas left to be created. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AreaCreator(java.lang.String widthDiceString,
java.lang.String heightDiceString,
int count)
widthDice - the dice used to define the widthheightDice - the dice used to define the heightcount - the number of areas| Method Detail |
|---|
public boolean hasMoreAreas()
public Area createArea(Map map)
map - the map to use for area creation
null
protected abstract Area createAreaImpl(int x1,
int y1,
int x2,
int y2)
x1 - the left x position of the areay1 - the left y position of the areax2 - the right x position of the areay2 - the right y position of the area
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||