public class Board
extends java.lang.Object
Constructor and Description |
---|
Board() |
Modifier and Type | Method and Description |
---|---|
int |
attack(Country attacker,
Country defender,
boolean attackTillDead)
If attackTillDead is true then perform attacks until one side or the other has been defeated.
|
int |
attack(int countryCodeAttacker,
int countryCodeDefender,
boolean attackTillDead)
If attackTillDead is true then perform attacks until one side or the other has been defeated.
|
boolean |
cashCards(Card card,
Card card2,
Card card3)
Cashes in the given card set.
|
int |
fortifyArmies(int numberOfArmies,
Country origin,
Country destination)
Order a fortification move.
|
int |
fortifyArmies(int numberOfArmies,
int countryCodeOrigin,
int countryCodeDestination)
Order a fortification move.
|
LuxAgent |
getAgentInstance(java.lang.String agentType)
Return a LuxAgent instance of the specified type (ie Angry, Trotsky, etc).
|
java.lang.String |
getAgentName(int player)
Returns whatever the name() method of the of the given agent returns.
|
static java.lang.String |
getAgentPath()
Get the local path to the Agents folder, where any resource files you need can be stored.
|
java.lang.String |
getCardProgression()
Return a string representation the card progression for this game.
|
int |
getContinentBonus(int cont)
Returns the number of bonus armies given for owning the specified continent.
|
int |
getContinentIncrease()
Return the percent increase of the continents.
|
java.lang.String |
getContinentName(int cont)
Returns the name of the specified continent (or null if the map did not give one).
|
Country[] |
getCountries()
Will return an array of all the countries in the game.
|
java.lang.String |
getMapPath()
Get the location of saved maps.
|
java.lang.String |
getMapTitle()
Returns the title of the current map.
|
int |
getNextCardSetValue()
Returns the number of armies given by the next card cash.
|
int |
getNumberOfContinents()
Returns the number of continents in the game.
|
int |
getNumberOfCountries()
Returns the number of countries in the game.
|
int |
getNumberOfPlayers()
Returns the number of players that started in the game.
|
int |
getNumberOfPlayersLeft()
Returns the number of players that are still own at least one country.
|
int |
getPlayerCards(int player)
Returns the number of cards that the specified player has.
|
int |
getPlayerIncome(int player)
Returns the current income of the specified player.
|
java.lang.String |
getPlayerName(int player)
Returns the TextField specified name of the given player.
|
int |
getTurnCount()
Return the count of the turn rounds for the game
|
int |
getTurnSecondsLeft()
Return the number of seconds left in this turn.
|
boolean |
immediateCash()
Returns whether or not cards are immediately cashed when taking over a player and ending up with 5 or more cards.
|
void |
placeArmies(int numberOfArmies,
Country country)
Places numberOfArmies armies in the given country.
|
void |
placeArmies(int numberOfArmies,
int countryCode)
Places numberOfArmies armies in the given country.
|
boolean |
playAudioAtURL(java.lang.String audioURL)
Play the audio file at the specified URL.
|
boolean |
sendChat(java.lang.String message)
Send a chat using the agent type (ie Cluster) as the name.
|
boolean |
sendChat(java.lang.String message,
LuxAgent sender)
Send a chat using the agent name (ie dustin) as the name.
|
boolean |
sendEmote(java.lang.String message)
Send an emote using the agent type (ie Cluster) as the name.
|
boolean |
sendEmote(java.lang.String message,
LuxAgent sender)
Send an emote using the agent name (ie dustin) as the name.
|
java.lang.String |
storageGet(java.lang.String key,
java.lang.String defaultValue)
Retrieve a string from persistant storage based on the given key.
|
boolean |
storageGetBoolean(java.lang.String key,
boolean defaultValue)
Retrieve a boolean from persistant storage based on the given key.
|
float |
storageGetFloat(java.lang.String key,
float defaultValue)
Retrieve a float from persistant storage based on the given key.
|
int |
storageGetInt(java.lang.String key,
int defaultValue)
Retrieve an int from persistant storage based on the given key.
|
void |
storagePut(java.lang.String key,
java.lang.String value)
Save a string associated with the given key into persistant storage.
|
void |
storagePutBoolean(java.lang.String key,
boolean value)
Save a boolean associated with the given key into persistant storage.
|
void |
storagePutFloat(java.lang.String key,
float value)
Save a float associated with the given key into persistant storage.
|
void |
storagePutInt(java.lang.String key,
int value)
Save an int associated with the given key into persistant storage.
|
void |
storageRemoveKey(java.lang.String key)
Remove any value from persistant storage associated with the given key.
|
boolean |
tookOverACountry()
Returns true if the current player has taken over a country this turn.
|
java.lang.String |
toString()
Gives a String representation of the board.
|
boolean |
transferCards()
Returns whether or not cards get transferred when a player is killed.
|
boolean |
useCards()
Returns whether or not cards are on in the preferences.
|
boolean |
useScenario()
Did the current game start with the scenario?
|
public int attack(Country attacker, Country defender, boolean attackTillDead)
This method may only be called from within an agent's attackPhase() method.
public int attack(int countryCodeAttacker, int countryCodeDefender, boolean attackTillDead)
This method may only be called from within an agent's attackPhase() method.
public boolean cashCards(Card card, Card card2, Card card3)
public int fortifyArmies(int numberOfArmies, Country origin, Country destination)
public int fortifyArmies(int numberOfArmies, int countryCodeOrigin, int countryCodeDestination)
public LuxAgent getAgentInstance(java.lang.String agentType)
public java.lang.String getAgentName(int player)
public static java.lang.String getAgentPath()
public java.lang.String getCardProgression()
public int getContinentBonus(int cont)
public int getContinentIncrease()
public java.lang.String getContinentName(int cont)
public Country[] getCountries()
public java.lang.String getMapPath()
public java.lang.String getMapTitle()
public int getNextCardSetValue()
public int getNumberOfContinents()
public int getNumberOfCountries()
public int getNumberOfPlayers()
public int getNumberOfPlayersLeft()
public int getPlayerCards(int player)
public int getPlayerIncome(int player)
public java.lang.String getPlayerName(int player)
public int getTurnCount()
public int getTurnSecondsLeft()
public boolean immediateCash()
public void placeArmies(int numberOfArmies, Country country)
public void placeArmies(int numberOfArmies, int countryCode)
public boolean playAudioAtURL(java.lang.String audioURL)
public boolean sendChat(java.lang.String message)
public boolean sendChat(java.lang.String message, LuxAgent sender)
public boolean sendEmote(java.lang.String message)
public boolean sendEmote(java.lang.String message, LuxAgent sender)
public java.lang.String storageGet(java.lang.String key, java.lang.String defaultValue)
public boolean storageGetBoolean(java.lang.String key, boolean defaultValue)
public float storageGetFloat(java.lang.String key, float defaultValue)
public int storageGetInt(java.lang.String key, int defaultValue)
public void storagePut(java.lang.String key, java.lang.String value)
public void storagePutBoolean(java.lang.String key, boolean value)
public void storagePutFloat(java.lang.String key, float value)
public void storagePutInt(java.lang.String key, int value)
public void storageRemoveKey(java.lang.String key)
public boolean tookOverACountry()
public java.lang.String toString()
toString
in class java.lang.Object
public boolean transferCards()
public boolean useCards()
public boolean useScenario()