|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectdip.world.Province.Adjacency
Adjacency maintains the connectivity graph between provinces.
Method Summary | |
protected void |
createWingCoasts()
Creates a WING coast from Province coastal data. |
protected Location[] |
getLocations(Coast coast)
Gets the locations which are adjacent to the coast. |
protected void |
setLocations(Coast coast,
Location[] locations)
Sets which locations are adjacent to the specified coast. |
protected boolean |
validate(Province p)
Ensure that adjacency data is consistent, and that there are no illegal coast combinations. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
protected void setLocations(Coast coast, Location[] locations)
protected Location[] getLocations(Coast coast)
If no locations are adjacent, a zero-length array is returned.
protected void createWingCoasts()
protected boolean validate(Province p)
The Province argument is required to correctly validate
convoyable coast regions. Convoyable coasts require a single
or multi-coast region with a defined land coast.
land / single / north / south / west / east
x = true; - = false; ? = true or false
L S N S W E
===========================================
- - ? ? ? ? INVALID (a) where at least one ? is true
- x ? ? ? ? INVALID (b) where at least one ? is true
x x ? ? ? ? INVALID (c) where at least one ? is true
- - - - - - INVALID (d)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |