public class CountryCluster
extends java.lang.Object
Constructor and Description |
---|
CountryCluster(java.util.List countries)
Create a CountryCluster containing exactly the countries in the given List.
|
Modifier and Type | Method and Description |
---|---|
int |
estimatedNumberOfArmiesNeededToConquer() |
int |
getArmies()
Get a count of the combined number of armies in this cluster.
|
java.util.List |
getList()
Return a List containing all the Country object that are included in this CountryCluster.
|
static CountryCluster |
getOwnedCluster(Country root)
Create a CountryCluster made up of every Country that is owned by the owner of 'root' and connected through friendly countries to 'root'.
|
static CountryCluster |
getOwnedCluster(Country root,
boolean orderNeighbors)
Create a CountryCluster made up of every Country that is owned by the owner of 'root' and connected through friendly countries to 'root'.
|
CountryRoute |
getSimpleRoute()
A possibly very slow method to get a CountryRoute that traverses through all the countries in the cluster.
|
CountryRoute |
getSimpleRoute(boolean optimizeForSingleOwner)
Same as getSimpleRoute() but a speed optimization can be made if the cluster is all owned by one player.
|
CountryRoute |
getSimpleRoute(boolean optimizeForSingleOwner,
int optimizeForAttackingPlayer)
Same as getSimpleRoute(boolean optimizeForSingleOwner) but a speed optimization can be made assuming the goal is for a specific player to kill the entire found route.
|
CountryRoute |
getSimpleRouteStartingAt(Country start)
Try and get a Route through the cluster that starts at the given country.
|
Country |
getStrongestNeighborOwnedBy(int ownerID)
Return a country that borders the cluster and is owned by ownerID.
|
int |
size()
Get a count of the number of countries in this cluster.
|
java.lang.String |
toString() |
public CountryCluster(java.util.List countries)
public int estimatedNumberOfArmiesNeededToConquer()
public int getArmies()
public java.util.List getList()
public static CountryCluster getOwnedCluster(Country root)
public static CountryCluster getOwnedCluster(Country root, boolean orderNeighbors)
public CountryRoute getSimpleRoute()
public CountryRoute getSimpleRoute(boolean optimizeForSingleOwner)
public CountryRoute getSimpleRoute(boolean optimizeForSingleOwner, int optimizeForAttackingPlayer)
public CountryRoute getSimpleRouteStartingAt(Country start)
public Country getStrongestNeighborOwnedBy(int ownerID)
public int size()
public java.lang.String toString()
toString
in class java.lang.Object