public class CountryClusterSet
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static CountryClusterSet |
getAllCountriesNotOwnedBy(int notOwnedBy,
Country[] countries)
Get the set of clusters that contain every Country in the given array that is not owned by the given player.
|
static CountryClusterSet |
getAllCountriesOwnedBy(int owner,
Country[] countries)
Create a set of CountryClusters making up all the countries owned by the given player.
|
CountryCluster |
getCluster(int i) |
static CountryClusterSet |
getHostileCountries(int hostileToOwner,
java.util.List startingCountries)
Get the set of clusters that contain all the countries in 'startingCountries' as well as all connecting countries that are hostile to the given owner.
|
int |
numberOfClusters() |
void |
orderWeakestFirst()
Sort the clusters in this set so they go from weakest (in number of armies) to strongest.
|
int |
size()
Return the number of Clusters in this set.
|
public static CountryClusterSet getAllCountriesNotOwnedBy(int notOwnedBy, Country[] countries)
public static CountryClusterSet getAllCountriesOwnedBy(int owner, Country[] countries)
public CountryCluster getCluster(int i)
public static CountryClusterSet getHostileCountries(int hostileToOwner, java.util.List startingCountries)
public int numberOfClusters()
public void orderWeakestFirst()
public int size()