|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Command is the interface that groups units in a command sense, not a physical one. It dispatches orders to its various components. It gives orders to armies and die when all are dead.
| Method Summary | |
void |
addNewUnit(Unit unit)
Add a unit, creating lower level coommands as needed. |
void |
addTaskForceToList(TaskForceList commandList)
Add this command to a list. |
void |
cancelAllOrders()
Cancel all orders, including subcommands, clear the order queue. |
void |
carryOutOrders()
Carry out orders. |
java.util.Iterator |
commandIterator()
Iterate over the sub-commands if any. |
java.lang.String |
commandStructure(java.lang.String indent)
The whole command structure. |
void |
dies()
Called when all units in the command are dead. |
float |
getAttackStrength()
Return the attack strength. |
Civilization |
getCivilization()
Get the owning civilization. |
HighCommand |
getHighCommand()
Get the high command. |
java.lang.String |
getName()
Return the name of this instance. |
int |
getNumberOfSubCommands()
Return number of sub-commands. |
int |
getNumberOfUnits()
Count the units in this command. |
float |
getPersonnel()
Return the total personnel. |
Army |
getSuperior()
Get the next higher command. |
TaskForce |
getTaskForce()
Add task force - return a new level 2 command, inserting commands in between as needed. |
boolean |
hasSettlers()
Return true if the command has settlers. |
boolean |
hasUnits()
Whether this command has any units to command. |
void |
issueOrders()
Issue orders. |
boolean |
merge(Command command)
Merge the other command with this one, removing the other command. |
Command |
newSubCommand()
Create a new sub-command. |
void |
remove()
Tidy up when this civilization is no more. |
void |
setName(java.lang.String value)
Set the name of this instance. |
void |
setSuperior(Army value)
Set the superior command. |
void |
split(Command subCommand)
Split the specified sub-command off into a separate command at this level. |
java.lang.String |
structure()
Return a complete command structure. |
java.lang.String |
structure(java.lang.String indent)
Return a complete command structure. |
java.util.Iterator |
taskForceIterator()
Iterate over the task forces if any. |
void |
transfer(Command subCommand)
Transfer sub-command. |
| Methods inherited from interface game.interfaces.Combatant |
getCombatData |
| Methods inherited from interface java.lang.Comparable |
compareTo |
| Method Detail |
public Civilization getCivilization()
getCivilization in interface Combatantpublic HighCommand getHighCommand()
public Army getSuperior()
public int getNumberOfSubCommands()
public void setName(java.lang.String value)
value - the name to set.public java.lang.String getName()
getName in interface Combatantpublic void dies()
public void remove()
public void addNewUnit(Unit unit)
unit - the new unit to add.public Command newSubCommand()
public void transfer(Command subCommand)
subCommand - the sub-command to be transferred to this command.public boolean merge(Command command)
command - the other same level command.
public void split(Command subCommand)
subCommand - the sub-command to be transferred to a new command.public int getNumberOfUnits()
public void setSuperior(Army value)
value - the new superior command.public java.lang.String commandStructure(java.lang.String indent)
public TaskForce getTaskForce()
public void addTaskForceToList(TaskForceList commandList)
public boolean hasUnits()
public float getAttackStrength()
public float getPersonnel()
public java.util.Iterator commandIterator()
public java.util.Iterator taskForceIterator()
public boolean hasSettlers()
public void cancelAllOrders()
public void issueOrders()
public void carryOutOrders()
public java.lang.String structure()
public java.lang.String structure(java.lang.String indent)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||