|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.freecol.client.control.InGameController
public final class InGameController
The controller that will be used while the game is played.
| Field Summary | |
|---|---|
private FreeColClient |
freeColClient
|
private static java.io.FileFilter |
FSG_FILTER
|
private GUI |
gui
|
private java.io.File |
lastSaveGameFile
The most recently saved game file, or null. |
private static java.util.logging.Logger |
logger
|
private java.util.HashMap<java.lang.String,java.lang.Integer> |
messagesToIgnore
|
private int |
MODE_END_TURN
|
private int |
MODE_EXECUTE_GOTO_ORDERS
|
private int |
MODE_NEXT_ACTIVE_UNIT
|
private int |
moveMode
|
private int |
turnsPlayed
|
private short |
UNIT_LAST_MOVE_DELAY
|
| Fields inherited from interface net.sf.freecol.common.networking.NetworkConstants |
|---|
NO_TRADE, NO_TRADE_GOODS, NO_TRADE_HAGGLE, NO_TRADE_HOSTILE, STEAL_LAND |
| Constructor Summary | |
|---|---|
InGameController(FreeColClient freeColClient,
GUI gui)
The constructor to use. |
|
| Method Summary | |
|---|---|
void |
abandonColony(Colony colony)
Abandon a colony with no units. |
private ServerAPI |
askServer()
Meaningfully named access to the ServerAPI. |
void |
assignTeacher(Unit student,
Unit teacher)
Assigns a unit to a teacher Unit. |
void |
assignTradeRoute(Unit unit)
Assigns a trade route to a unit using the trade route dialog. |
void |
assignTradeRoute(Unit unit,
TradeRoute tradeRoute)
Assigns a trade route to a unit. |
private void |
attemptBuyFromSettlement(Unit unit,
Settlement settlement)
User interaction for buying from the natives. |
private void |
attemptGiftToSettlement(Unit unit,
Settlement settlement)
User interaction for delivering a gift to the natives. |
private void |
attemptSellToSettlement(Unit unit,
Settlement settlement)
User interaction for selling to the natives. |
private void |
autosave_game()
Creates at least one autosave game file of the currently played game in the autosave directory. |
boolean |
boardShip(Unit unit,
Unit carrier)
Boards a specified unit onto a carrier. |
void |
buildColony()
Use the active unit to build a colony. |
private boolean |
buildColonyShowWarnings(Tile tile,
Unit unit)
A colony is proposed to be built. |
boolean |
buyGoods(GoodsType type,
int amount,
Unit carrier)
Buy goods in Europe. |
void |
changeState(Unit unit,
Unit.UnitState state)
Changes the state of this Unit. |
void |
changeWorkImprovementType(Unit unit,
TileImprovementType improvementType)
Changes the work type of this Unit. |
void |
changeWorkType(Unit unit,
GoodsType workType)
Changes the work type of this Unit. |
boolean |
checkCashInTreasureTrain(Unit unit)
Check if a unit is a treasure train, and if it should be cashed in. |
boolean |
claimLand(Tile tile,
Colony colony,
int offer)
Claim a tile. |
private boolean |
claimTile(Player player,
Tile tile,
Colony colony,
int price,
int offer)
Claim a tile. |
void |
clearGotoOrders(Unit unit)
Clears the goto orders of the given unit by setting its destination to null. |
boolean |
clearOrders(Unit unit)
Clears the orders of the given unit. |
void |
clearSpeciality(Unit unit)
Clear the speciality of a Unit, making it a Free Colonist. |
private boolean |
confirmHostileAction(Unit attacker,
Tile target)
Check if an attack results in a transition from peace or cease fire to war and, if so, warn the player. |
private boolean |
confirmPreCombat(Unit attacker,
Tile tile)
Shows the pre-combat dialog if enabled, allowing the user to view the odds and possibly cancel the attack. |
void |
declareIndependence()
Declares independence for the home country. |
void |
disbandActiveUnit()
Disbands the active unit. |
void |
displayModelMessages(boolean allMessages)
Displays pending ModelMessages. |
void |
displayModelMessages(boolean allMessages,
boolean endOfTurn)
Displays pending ModelMessages. |
private void |
doEndTurn()
Really end the turn. |
private boolean |
doExecuteGotoOrders()
Actually do the goto orders operation. |
private void |
emigrate(Player player,
int slot)
Emigrate a unit from Europe. |
void |
endTurn()
End the turn command. |
void |
equipUnit(Unit unit,
EquipmentType type,
int amount)
Change the amount of equipment a unit has. |
void |
executeGotoOrders()
Execute goto orders command. |
private boolean |
followPath(Unit unit,
PathNode path)
Follow a path. |
private boolean |
followTradeRoute(Unit unit)
Follows a trade route, doing load/unload actions, moving the unit, and updating the stop and destination. |
java.util.Map<java.lang.String,java.lang.String> |
getClientStatistics()
Retrieves client statistics. |
java.util.List<HighScore> |
getHighScores()
Retrieves high scores from server. |
java.io.File |
getLastSaveGameFile()
Gets the most recently saved game file, or null. |
private ModelMessage |
getLoadGoodsMessage(Unit unit,
GoodsType type,
int amount,
int present,
int atStop,
int toLoad)
Gets a message describing a goods loading. |
private StringTemplate |
getNationAt(Tile tile,
Map.Direction direction)
Convenience function to find the nation controlling an adjacent settlement. |
NationSummary |
getNationSummary(Player player)
Get the nation summary for a player. |
TradeRoute |
getNewTradeRoute(Player player)
Gets a new trade route for a player. |
java.util.List<AbstractUnit> |
getREFUnits()
Gathers information about the REF. |
private java.lang.String |
getSaveGameString(Turn turn)
Returns a string representation of the given turn suitable for savegame files. |
java.util.Map<java.lang.String,java.lang.String> |
getServerStatistics()
Retrieves the server statistics. |
private Settlement |
getSettlementAt(Tile tile,
Map.Direction direction)
Convenience function to find an adjacent settlement. |
private Specification |
getSpecification()
Gets the specification for the current game. |
private java.lang.Integer |
getTurnForMessageIgnored(java.lang.String key)
|
private ModelMessage |
getUnloadGoodsMessage(Unit unit,
GoodsType type,
int amount,
int atStop,
int present,
int toUnload)
Gets a message describing a goods unloading. |
void |
ignoreMessage(ModelMessage message,
boolean flag)
Ignore this ModelMessage from now on until it is not generated in a turn. |
boolean |
leaveShip(Unit unit)
Leave a ship. |
void |
loadCargo(Goods goods,
Unit carrier)
Loads a cargo onto a carrier. |
void |
loadGame()
Opens a dialog where the user should specify the filename and loads the game. |
private boolean |
loadGoods(Goods goods,
Unit carrier)
Load some goods onto a carrier. |
private boolean |
loadUnitAtStop(Unit unit,
java.util.List<ModelMessage> messages)
Work out what goods to load onto a unit at a stop, and load them. |
void |
move(Unit unit,
Map.Direction direction)
Moves the specified unit in a specified direction. |
void |
moveActiveUnit(Map.Direction direction)
Moves the active unit in a specified direction. |
private void |
moveAttack(Unit unit,
Map.Direction direction)
Confirm attack or demand a tribute from a native settlement, following an attacking move. |
private boolean |
moveDirection(Unit unit,
Map.Direction direction,
boolean interactive)
Move a unit in a given direction. |
private boolean |
moveDisembark(Unit unit,
Map.Direction direction)
Check the carrier for passengers to disembark, possibly snatching a useful result from the jaws of a MOVE_NO_ACCESS_LAND failure. |
private void |
moveEmbark(Unit unit,
Map.Direction direction)
Embarks the specified unit onto a carrier in a specified direction following a move of MoveType.EMBARK. |
private void |
moveExplore(Unit unit,
Map.Direction direction)
Confirm exploration of a lost city rumour, following a move of MoveType.EXPLORE_LOST_CITY_RUMOUR. |
private boolean |
moveHighSeas(Unit unit,
Map.Direction direction)
Moves a unit onto the "high seas" in a specified direction following a move of MoveType.MOVE_HIGH_SEAS. |
private void |
moveLearnSkill(Unit unit,
Map.Direction direction)
Move a free colonist to a native settlement to learn a skill following a move of MoveType.ENTER_INDIAN_SETTLEMENT_WITH_FREE_COLONIST. |
private void |
moveMove(Unit unit,
Map.Direction direction)
Actually move a unit in a specified direction, following a move of MoveType.MOVE. |
private void |
moveScoutColony(Unit unit,
Map.Direction direction)
Move to a foreign colony and either attack, negotiate with the foreign power or spy on them. |
private void |
moveScoutIndianSettlement(Unit unit,
Map.Direction direction)
Move a scout into an Indian settlement to speak with the chief, or demand a tribute following a move of MoveType.ENTER_INDIAN_SETTLEMENT_WITH_SCOUT. |
private void |
moveSpy(Unit unit,
Map.Direction direction)
Spy on a foreign colony. |
void |
moveTo(Unit unit,
Location destination)
Moves the specified unit somewhere that requires crossing the high seas. |
boolean |
moveToDestination(Unit unit)
Moves the given unit towards its destination/s if possible. |
private void |
moveTrade(Unit unit,
Map.Direction direction)
Arrive at a settlement with a laden carrier following a move of MoveType.ENTER_SETTLEMENT_WITH_CARRIER_AND_GOODS. |
private void |
moveTradeColony(Unit unit,
Map.Direction direction)
Initiates a negotiation with a foreign power. |
private void |
moveTradeIndianSettlement(Unit unit,
Map.Direction direction)
Trading with the natives, including buying, selling and delivering gifts. |
private void |
moveTribute(Unit unit,
Map.Direction direction)
Demand a tribute. |
private void |
moveUseMissionary(Unit unit,
Map.Direction direction)
Move a missionary into a native settlement, following a move of MoveType.ENTER_INDIAN_SETTLEMENT_WITH_MISSIONARY. |
void |
nextActiveUnit()
Makes a new unit active. |
void |
nextActiveUnit(Tile tile)
Makes a new unit active if any, or focus on a tile (useful if the current unit just died). |
void |
nextModelMessage()
Displays the next ModelMessage. |
boolean |
payArrears(GoodsType type)
Pays the tax arrears on this type of goods. |
void |
payForBuilding(Colony colony)
Buys the remaining hammers and tools for the Building currently
being built in the given Colony. |
boolean |
putOutsideColony(Unit unit)
Puts the specified unit outside the colony. |
boolean |
quickReload()
Reloads a game state which was previously saved via quicksaveGame. |
boolean |
quicksaveGame()
Saves the game to a fix-named file in the autosave directory, which may be used for quick-reload. |
void |
recruitUnitInEurope(int index)
Recruit a unit from a specified index in Europe. |
void |
rename(Nameable object)
Renames a Nameable. |
private boolean |
requireOurTurn()
Require that it is this client's player's turn. |
boolean |
saveGame()
Opens a dialog where the user should specify the filename and saves the game. |
boolean |
saveGame(java.io.File file)
Saves the game to the given file. |
void |
selectDestination(Unit unit)
Selects a destination for this unit. |
boolean |
sellGoods(Goods goods)
Sells goods in Europe. |
void |
sendChat(java.lang.String chat)
Sends a public chat message. |
void |
setBuildQueue(Colony colony,
java.util.List<BuildableType> buildQueue)
Changes the current construction project of a Colony. |
void |
setCurrentPlayer(Player player)
Set a player to be the new current player. |
boolean |
setDestination(Unit unit,
Location destination)
Set the destination of the given unit. |
void |
setGameConnected()
Informs this controller that a game has been newly loaded. |
void |
setGoodsLevels(Colony colony,
GoodsType goodsType)
Sets the export settings of the custom house. |
void |
setInDebugMode(boolean debug)
Sets the "debug mode" to be active or not. |
void |
setTradeRoutes(java.util.List<TradeRoute> routes)
Sets the trade routes for this player |
private boolean |
shouldAllowMessage(ModelMessage message)
Provides an opportunity to filter the messages delivered to the canvas. |
private void |
showTradeFail(int fail,
Settlement settlement,
Goods goods)
Displays an appropriate trade failure message. |
void |
skipActiveUnit()
Skip a unit. |
private void |
startIgnoringMessage(java.lang.String key,
int turn)
|
private void |
stopIgnoringMessage(java.lang.String key)
|
void |
trainUnitInEurope(UnitType unitType)
Trains a unit of a specified type in Europe. |
void |
unload(Unit unit)
Unload, including dumping cargo. |
void |
unloadCargo(Goods goods,
boolean dump)
Unload cargo. |
private boolean |
unloadGoods(Goods goods,
Unit carrier,
Colony colony)
Unload some goods from a carrier. |
private boolean |
unloadUnitAtStop(Unit unit,
java.util.List<ModelMessage> messages)
Work out what goods to unload from a unit at a stop, and unload them. |
void |
updateTradeRoute(TradeRoute route)
Updates a trade route. |
void |
waitActiveUnit()
Tell a unit to wait. |
void |
work(Unit unit,
WorkLocation workLocation)
Moves a Unit to a WorkLocation. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.util.logging.Logger logger
private final FreeColClient freeColClient
private final short UNIT_LAST_MOVE_DELAY
private final int MODE_NEXT_ACTIVE_UNIT
private final int MODE_EXECUTE_GOTO_ORDERS
private final int MODE_END_TURN
private int moveMode
private int turnsPlayed
private java.io.File lastSaveGameFile
private static java.io.FileFilter FSG_FILTER
private java.util.HashMap<java.lang.String,java.lang.Integer> messagesToIgnore
private GUI gui
| Constructor Detail |
|---|
public InGameController(FreeColClient freeColClient,
GUI gui)
freeColClient - The main controller.| Method Detail |
|---|
public void setGameConnected()
public void setInDebugMode(boolean debug)
FreeCol.setInDebugMode(boolean) and reinitialize the
FreeColMenuBar.
debug - Set to true to enable debug mode.private ServerAPI askServer()
private Specification getSpecification()
private boolean requireOurTurn()
private boolean confirmHostileAction(Unit attacker,
Tile target)
attacker - The potential attacking Unit.target - The target Tile.
private boolean confirmPreCombat(Unit attacker,
Tile tile)
attacker - The attacking Unit.tile - The target Tile.
private Settlement getSettlementAt(Tile tile,
Map.Direction direction)
tile - The Tile to start at.direction - The Direction to step.
private StringTemplate getNationAt(Tile tile,
Map.Direction direction)
tile - The Tile to start at.direction - The Direction to step.
private boolean doExecuteGotoOrders()
private void doEndTurn()
private boolean followTradeRoute(Unit unit)
unit - The Unit on the route.
private boolean loadUnitAtStop(Unit unit,
java.util.List<ModelMessage> messages)
unit - The Unit to load.messages - An optional list of messages to update.
private ModelMessage getLoadGoodsMessage(Unit unit,
GoodsType type,
int amount,
int present,
int atStop,
int toLoad)
unit - The Unit that is loading.type - The GoodsType the type of goods being loaded.amount - The amount of goods loaded.present - The amount of goods already at the location.atStop - The amount of goods available to load.toLoad - The amount of goods the unit could load.
private boolean unloadUnitAtStop(Unit unit,
java.util.List<ModelMessage> messages)
unit - The Unit to unload.messages - A list of messages to update.
private ModelMessage getUnloadGoodsMessage(Unit unit,
GoodsType type,
int amount,
int atStop,
int present,
int toUnload)
unit - The Unit that is unloading.type - The GoodsType the type of goods being unloaded.amount - The amount of goods unloaded.present - The amount of goods already carried by the unit.atStop - The amount of goods available to unload.toUnload - The amount of goods actually unloaded.
private boolean claimTile(Player player,
Tile tile,
Colony colony,
int price,
int offer)
player - The Player that is claiming.tile - The Tile to claim.colony - An optional Colony to own the tile.price - The price required.offer - An offer to pay.
private void emigrate(Player player,
int slot)
player - The Player that owns the unit.slot - The slot to emigrate from.
private boolean followPath(Unit unit,
PathNode path)
unit - The Unit to move.path - The path to follow.
private boolean loadGoods(Goods goods,
Unit carrier)
goods - The Goods to load.carrier - The Unit to load onto.
private boolean unloadGoods(Goods goods,
Unit carrier,
Colony colony)
goods - The Goods to unload.carrier - The Unit carrying the goods.colony - The Colony to unload to,
or null if unloading in Europe.
private void autosave_game()
private java.lang.String getSaveGameString(Turn turn)
turn - a Turn value
public java.io.File getLastSaveGameFile()
public void loadGame()
public boolean quickReload()
quicksaveGame.
public boolean saveGame()
public boolean saveGame(java.io.File file)
file - The File.
public boolean quicksaveGame()
private boolean shouldAllowMessage(ModelMessage message)
message - the message that is candidate for delivery to the canvas
private void startIgnoringMessage(java.lang.String key,
int turn)
private void stopIgnoringMessage(java.lang.String key)
private java.lang.Integer getTurnForMessageIgnored(java.lang.String key)
public void ignoreMessage(ModelMessage message,
boolean flag)
message - a ModelMessage valueflag - whether to ignore the ModelMessage or notpublic void displayModelMessages(boolean allMessages)
ModelMessages.
allMessages - Display all messages or just the undisplayed ones.
public void displayModelMessages(boolean allMessages,
boolean endOfTurn)
ModelMessages.
allMessages - Display all messages or just the undisplayed ones.endOfTurn - Use a turn report panel if necessary.public void nextModelMessage()
ModelMessage.
public void abandonColony(Colony colony)
colony - The Colony to be abandoned.
public void assignTeacher(Unit student,
Unit teacher)
Unit.
student - an Unit valueteacher - an Unit valuepublic void assignTradeRoute(Unit unit)
unit - The Unit to assign a trade route to.
public void assignTradeRoute(Unit unit,
TradeRoute tradeRoute)
unit - The Unit to assign a trade route to.tradeRoute - The TradeRoute to assign.
public boolean boardShip(Unit unit,
Unit carrier)
unit - The Unit which is to board the carrier.carrier - The carrier to board.
public void buildColony()
private boolean buildColonyShowWarnings(Tile tile,
Unit unit)
tile - The Tile on which the colony is to be built.unit - The Unit which is to build the colony.
public boolean buyGoods(GoodsType type,
int amount,
Unit carrier)
type - The type of goods to buy.amount - The amount of goods to buy.carrier - The Unit acting as carrier.
public void changeState(Unit unit,
Unit.UnitState state)
Unit.
unit - The Unitstate - The state of the unit.
public void changeWorkImprovementType(Unit unit,
TileImprovementType improvementType)
Unit.
unit - The UnitimprovementType - a TileImprovementType value
public void changeWorkType(Unit unit,
GoodsType workType)
Unit.
unit - The UnitworkType - The new GoodsType to produce.public boolean checkCashInTreasureTrain(Unit unit)
owner.
unit - The Unit to be checked.
public boolean claimLand(Tile tile,
Colony colony,
int offer)
tile - The Tile to claim.colony - An optional Colony to own the tile.offer - An offer to pay.
public void clearGotoOrders(Unit unit)
unit - The Unit to clear the destination for.public boolean clearOrders(Unit unit)
unit - The Unit to clear the orders of
public void clearSpeciality(Unit unit)
unit - The Unit to clear the speciality of.public void declareIndependence()
public void disbandActiveUnit()
public void endTurn()
public void equipUnit(Unit unit,
EquipmentType type,
int amount)
unit - The Unit.type - The EquipmentType to equip with.amount - How to change the amount of equipment the unit has.public void executeGotoOrders()
public java.util.Map<java.lang.String,java.lang.String> getClientStatistics()
Map containing the client statistics.public java.util.List<HighScore> getHighScores()
public NationSummary getNationSummary(Player player)
player - The Player to summarize.
public TradeRoute getNewTradeRoute(Player player)
player - The Player to get a new trade route for.
TradeRoute.public java.util.List<AbstractUnit> getREFUnits()
List valuepublic java.util.Map<java.lang.String,java.lang.String> getServerStatistics()
Map containing the server statistics.public boolean leaveShip(Unit unit)
unit - The Unit which is to leave the ship.
public void loadCargo(Goods goods,
Unit carrier)
goods - The Goods which are going aboard the carrier.carrier - The Unit acting as carrier.
public void moveTo(Unit unit,
Location destination)
unit - The Unit to be moved.destination - The Location to be moved to.
java.lang.IllegalArgumentException - if destination or unit are null.public void moveActiveUnit(Map.Direction direction)
direction - The direction in which to move the active unit.
public void move(Unit unit,
Map.Direction direction)
unit - The Unit to be moved.direction - The direction in which to move the unit.public boolean moveToDestination(Unit unit)
unit - The Unit to move.
private boolean moveDirection(Unit unit,
Map.Direction direction,
boolean interactive)
unit - The Unit to move.direction - The Direction to move in.interactive - Interactive mode: play sounds and emit errors.
private void moveAttack(Unit unit,
Map.Direction direction)
unit - The Unit to perform the attack.direction - The direction in which to attack.
private boolean moveDisembark(Unit unit,
Map.Direction direction)
unit - The carrier containing the unit to disembark.direction - The direction in which to disembark the unit.
private void moveEmbark(Unit unit,
Map.Direction direction)
unit - The Unit that wishes to embark.direction - The direction in which to embark.
private void moveExplore(Unit unit,
Map.Direction direction)
unit - The Unit that is exploring.direction - The direction of a rumour.
private boolean moveHighSeas(Unit unit,
Map.Direction direction)
unit - The Unit to be moved.direction - The direction in which to move.
private void moveLearnSkill(Unit unit,
Map.Direction direction)
unit - The Unit to learn the skill.direction - The direction in which the Indian settlement lies.
private void moveMove(Unit unit,
Map.Direction direction)
unit - The Unit to be moved.direction - The direction in which to move the Unit.
private void moveScoutColony(Unit unit,
Map.Direction direction)
unit - The unit that will spy, negotiate or attack.direction - The direction in which the foreign colony lies.
private void moveScoutIndianSettlement(Unit unit,
Map.Direction direction)
unit - The Unit that is scouting.direction - The direction in which the Indian settlement lies.
private void moveSpy(Unit unit,
Map.Direction direction)
unit - The Unit that is spying.direction - The Direction of a colony to spy on.
private void moveTrade(Unit unit,
Map.Direction direction)
unit - The carrier.direction - The direction to the settlement.
private void moveTradeColony(Unit unit,
Map.Direction direction)
unit - The Unit negotiating.direction - The direction of a settlement to negotiate with.
private void moveTradeIndianSettlement(Unit unit,
Map.Direction direction)
unit - The Unit that is a carrier containing goods.direction - The direction the unit could move in order to enter a
Settlement.
java.lang.IllegalArgumentException - if the unit is not a carrier, or if
there is no Settlement in the given
direction.Settlement
private void showTradeFail(int fail,
Settlement settlement,
Goods goods)
fail - The failure state.settlement - The Settlement that failed to trade.goods - The Goods that failed to trade.
private void attemptBuyFromSettlement(Unit unit,
Settlement settlement)
unit - The Unit that is trading.settlement - The Settlement that is trading.
private void attemptSellToSettlement(Unit unit,
Settlement settlement)
unit - The Unit that is trading.settlement - The Settlement that is trading.
private void attemptGiftToSettlement(Unit unit,
Settlement settlement)
unit - The Unit that is trading.settlement - The Settlement that is trading.
private void moveTribute(Unit unit,
Map.Direction direction)
unit - The Unit to perform the attack.direction - The direction in which to attack.
private void moveUseMissionary(Unit unit,
Map.Direction direction)
unit - The Unit that will enter the settlement.direction - The direction in which the Indian settlement lies.public void nextActiveUnit()
public void nextActiveUnit(Tile tile)
ModelMessages with
nextModelMessage().
tile - The Tile to select if no new unit can
be made active.public boolean payArrears(GoodsType type)
type - The type of goods for which to pay arrears.
public void payForBuilding(Colony colony)
Building currently
being built in the given Colony.
colony - The Colony where the building should be bought.public boolean putOutsideColony(Unit unit)
unit - The Unit
public void recruitUnitInEurope(int index)
index - The index in Europe to recruit from ([0..2]).public void rename(Nameable object)
Nameable.
Apparently this can be done while it is not your turn.
object - The object to rename.public void selectDestination(Unit unit)
unit - The unit for which to select a destination.public boolean sellGoods(Goods goods)
goods - The goods to be sold.
public void sendChat(java.lang.String chat)
chat - The text of the message.
public void setBuildQueue(Colony colony,
java.util.List<BuildableType> buildQueue)
Colony.
colony - The ColonybuildQueue - List of BuildableTypepublic void setCurrentPlayer(Player player)
player - The Player to be the new current player.
public boolean setDestination(Unit unit,
Location destination)
unit - The Unit to direct.destination - The destination Location.
Unit.setDestination(Location)
public void setGoodsLevels(Colony colony,
GoodsType goodsType)
colony - The colony with the custom house.goodsType - The goods for which to set the settings.public void setTradeRoutes(java.util.List<TradeRoute> routes)
routes - The trade routes to set.public void skipActiveUnit()
public void trainUnitInEurope(UnitType unitType)
unitType - The type of unit to be trained.public void unload(Unit unit)
unit - The Unit that is dumping.
public void unloadCargo(Goods goods,
boolean dump)
goods - The Goods to unload.dump - If true, dump the goods.public void updateTradeRoute(TradeRoute route)
route - The trade route to update.public void waitActiveUnit()
public void work(Unit unit,
WorkLocation workLocation)
Unit to a WorkLocation.
unit - The Unit.workLocation - The WorkLocation.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||