|
||||||||||
PREV NEXT | FRAMES NO FRAMES |
Packages that use Unit | |
---|---|
net.sf.freecol.client.control | Contains the classes responsible for the control of the game. |
net.sf.freecol.client.gui | Contains the GUI classes. |
net.sf.freecol.client.gui.animation | |
net.sf.freecol.client.gui.i18n | |
net.sf.freecol.client.gui.panel | Contains the panels and dialogs. |
net.sf.freecol.common.model | Contains the game model. |
net.sf.freecol.common.model.pathfinding | Classes used when making searches on the map. |
net.sf.freecol.common.networking | Contains the common networking classes. |
net.sf.freecol.server | The main package of the server package tree. |
net.sf.freecol.server.ai | The main package of the ai package tree. |
net.sf.freecol.server.ai.mission | Contains the missions an AIUnit can be assigned to. |
net.sf.freecol.server.control | Contains the classes responsible for the control of the game. |
net.sf.freecol.server.model | Contains model classes with server specific information. |
Uses of Unit in net.sf.freecol.client.control |
---|
Methods in net.sf.freecol.client.control that return Unit | |
---|---|
Unit |
ClientModelController.createUnit(java.lang.String taskID,
Location location,
Player owner,
UnitType type)
Creates a new unit. |
Methods in net.sf.freecol.client.control with parameters of type Unit | |
---|---|
void |
InGameController.assignTeacher(Unit student,
Unit teacher)
Assigns a unit to a teacher Unit . |
void |
InGameController.assignTradeRoute(Unit unit)
Assigns a trade route to a unit. |
void |
InGameController.assignTradeRoute(Unit unit,
TradeRoute tradeRoute)
|
boolean |
InGameController.boardShip(Unit unit,
Unit carrier)
Boards a specified unit onto a carrier. |
void |
InGameController.buyGoods(GoodsType type,
int amount,
Unit carrier)
Buys goods in Europe. |
void |
InGameController.centerOnUnit(Unit unit)
Centers the map on the given unit location. |
void |
InGameController.changeState(Unit unit,
Unit.UnitState state)
Changes the state of this Unit . |
void |
InGameController.changeWorkImprovementType(Unit unit,
TileImprovementType improvementType)
Changes the work type of this Unit . |
void |
InGameController.changeWorkType(Unit unit,
GoodsType workType)
Changes the work type of this Unit . |
boolean |
InGameController.checkCashInTreasureTrain(Unit unit)
Check if a unit is a treasure train, and if it should be cashed in. |
void |
InGameController.clearGotoOrders(Unit unit)
Clears the orders of the given Unit . |
void |
InGameController.clearOrders(Unit unit)
Clears the orders of the given Unit The orders are cleared
by making the unit Unit.UnitState.ACTIVE and setting a null
destination |
void |
InGameController.clearSpeciality(Unit unit)
Clear the speciality of a Unit . |
void |
InGameController.equipUnit(Unit unit,
EquipmentType type,
int amount)
Equips or unequips a Unit with a certain type of
Goods . |
void |
InGameController.leaveShip(Unit unit)
Leave a ship. |
void |
InGameController.loadCargo(Goods goods,
Unit carrier)
Loads a cargo onto a carrier. |
void |
InGameController.move(Unit unit,
Map.Direction direction)
Moves the specified unit in a specified direction. |
void |
InGameController.moveToAmerica(Unit unit)
Moves the specified unit to America. |
void |
InGameController.moveToDestination(Unit unit)
Moves the given unit towards the destination given by getDestination() . |
void |
InGameController.moveToEurope(Unit unit)
Moves the specified unit to Europe. |
boolean |
InGameController.putOutsideColony(Unit unit)
Puts the specified unit outside the colony. |
void |
InGameController.selectDestination(Unit unit)
Selects a destination for this unit. |
void |
InGameController.setDestination(Unit unit,
Location destination)
Sets the destination of the given unit and send the server a message for this action. |
Location |
ClientModelController.setToVacantEntryLocation(Unit unit)
Puts the specified Unit in America. |
void |
ClientModelController.tileImprovementFinished(Unit unit,
TileImprovement improvement)
Tells the ModelController that a tile improvement was finished |
void |
InGameController.work(Unit unit,
WorkLocation workLocation)
Moves a Unit to a WorkLocation . |
Uses of Unit in net.sf.freecol.client.gui |
---|
Methods in net.sf.freecol.client.gui that return Unit | |
---|---|
Unit |
GUI.getActiveUnit()
Gets the active unit. |
Unit |
GUI.getUnitInFront(Tile unitTile)
Gets the unit that should be displayed on the given tile. |
Methods in net.sf.freecol.client.gui with parameters of type Unit | |
---|---|
void |
GUI.displayOccupationIndicator(java.awt.Graphics g,
Unit unit,
int x,
int y)
|
boolean |
ViewMode.displayUnitCursor(Unit unit,
int canvasX,
int canvasY)
|
void |
GUI.executeWithUnitOutForAnimation(Unit unit,
Tile sourceTile,
OutForAnimationCallback r)
Run some code with the given unit made invisible. |
javax.swing.ImageIcon |
ImageLibrary.getUnitImageIcon(Unit unit)
Returns the ImageIcon that will represent the given unit. |
javax.swing.ImageIcon |
ImageLibrary.getUnitImageIcon(Unit unit,
boolean grayscale)
Returns the ImageIcon that will represent the given unit. |
void |
GUI.setActiveUnit(Unit activeUnit)
Sets the active unit. |
DiplomaticTrade |
Canvas.showNegotiationDialog(Unit unit,
Settlement settlement,
DiplomaticTrade agreement)
Displays the NegotiationDialog . |
Canvas.ScoutAction |
Canvas.showScoutForeignColonyDialog(Colony colony,
Unit unit)
Displays a dialog that asks the user what he wants to do with his scout in the foreign colony. |
Uses of Unit in net.sf.freecol.client.gui.animation |
---|
Methods in net.sf.freecol.client.gui.animation with parameters of type Unit | |
---|---|
static void |
Animations.unitAttack(Canvas canvas,
Unit attacker,
Unit defender,
CombatModel.CombatResultType result)
Animates a unit attack. |
static void |
Animations.unitMove(Canvas canvas,
Unit unit,
Tile source,
Tile destination)
Animates a unit move. |
Constructors in net.sf.freecol.client.gui.animation with parameters of type Unit | |
---|---|
UnitImageAnimation(Canvas canvas,
Unit unit,
SimpleZippedAnimation animation,
Map.Direction direction)
Constructor |
Uses of Unit in net.sf.freecol.client.gui.i18n |
---|
Methods in net.sf.freecol.client.gui.i18n with parameters of type Unit | |
---|---|
static java.lang.String |
Messages.getLabel(Unit unit)
Returns the name of a unit in a human readable format. |
static java.lang.String |
Messages.getLocationName(Unit unit)
Returns a name for this unit, as a location. |
Uses of Unit in net.sf.freecol.client.gui.panel |
---|
Fields in net.sf.freecol.client.gui.panel with type parameters of type Unit | |
---|---|
static java.util.Comparator<Unit> |
ReportPanel.unitTypeComparator
|
Methods in net.sf.freecol.client.gui.panel that return Unit | |
---|---|
Unit |
CargoPanel.getCarrier()
Get the Carrier value. |
Unit |
EuropePanel.getSelectedUnit()
Returns the currently select unit. |
Unit |
ColonyPanel.getSelectedUnit()
Returns the currently select unit. |
Unit |
UnitLabel.getUnit()
Returns this UnitLabel's unit data. |
Unit |
InfoPanel.getUnit()
Gets the Unit in which this InfoPanel is
displaying information about. |
Unit |
InfoPanel.UnitInfoPanel.getUnit()
Gets the Unit in which this InfoPanel
is displaying information about. |
Methods in net.sf.freecol.client.gui.panel that return types with arguments of type Unit | |
---|---|
static java.util.Comparator<Unit> |
ReportPanel.getUnitTypeComparator()
Returns a unit type comparator. |
Methods in net.sf.freecol.client.gui.panel with parameters of type Unit | |
---|---|
void |
ColonyPanel.initialize(Colony colony,
Unit preSelectedUnit)
Initialize the data on the window. |
void |
ColonyPanel.InPortPanel.initialize(Unit selectedUnit)
|
void |
CaptureGoodsDialog.initialize(Unit capturedUnit,
Unit capturingUnit)
Inits the dialog. |
void |
CargoPanel.setCarrier(Unit newCarrier)
Set the Carrier value. |
void |
EuropePanel.setSelectedUnit(Unit unit)
Selects a unit that is located somewhere on this panel. |
void |
ColonyPanel.setSelectedUnit(Unit unit)
Selects a unit that is located somewhere on this panel. |
void |
InfoPanel.update(Unit unit)
Updates this InfoPanel . |
void |
InfoPanel.UnitInfoPanel.update(Unit unit)
Updates this InfoPanel . |
Constructors in net.sf.freecol.client.gui.panel with parameters of type Unit | |
---|---|
DumpCargoDialog(Canvas parent,
Unit unit)
The constructor that will add the items to this panel. |
|
NegotiationDialog(Canvas parent,
Unit unit,
Settlement settlement)
Creates a new NegotiationDialog instance. |
|
NegotiationDialog(Canvas parent,
Unit unit,
Settlement settlement,
DiplomaticTrade agreement)
Creates a new NegotiationDialog instance. |
|
PreCombatDialog(Unit attacker,
Unit defender,
Settlement settlement,
Canvas parent)
|
|
SelectDestinationDialog(Canvas parent,
Unit unit)
The constructor to use. |
|
UnitLabel(Unit unit,
Canvas parent)
Initializes this JLabel with the given unit data. |
|
UnitLabel(Unit unit,
Canvas parent,
boolean isSmall)
Initializes this JLabel with the given unit data. |
|
UnitLabel(Unit unit,
Canvas parent,
boolean isSmall,
boolean ignoreLocation)
Initializes this JLabel with the given unit data. |
|
WorkProductionPanel(Canvas canvas,
Unit unit)
|
Uses of Unit in net.sf.freecol.common.model |
---|
Methods in net.sf.freecol.common.model that return Unit | |
---|---|
Unit |
ModelController.createUnit(java.lang.String taskID,
Location location,
Player owner,
UnitType type)
Creates a new unit. |
Unit |
Building.findStudent(Unit teacher)
|
Unit |
Colony.findTeacher(Unit unit)
|
Unit |
Tile.getDefendingUnit(Unit attacker)
Gets the Unit that is currently defending this
Tile . |
abstract Unit |
Settlement.getDefendingUnit(Unit attacker)
Gets the Unit that is currently defending this Settlement . |
Unit |
IndianSettlement.getDefendingUnit(Unit attacker)
Gets the Unit that is currently defending this IndianSettlement . |
Unit |
Colony.getDefendingUnit(Unit attacker)
Gets the Unit that is currently defending this
Colony . |
Unit |
Unit.getFirstUnit()
Gets the first Unit beeing carried by this
Unit . |
Unit |
Tile.getFirstUnit()
Gets the first Unit on this tile. |
Unit |
IndianSettlement.getFirstUnit()
|
Unit |
Europe.getFirstUnit()
Gets the first Unit in this Europe . |
Unit |
ColonyTile.getFirstUnit()
Gets the Unit currently working on this ColonyTile . |
Unit |
Building.getFirstUnit()
Gets the first unit in this building. |
Unit |
Unit.getLastUnit()
Gets the last Unit beeing carried by this
Unit . |
Unit |
Tile.getLastUnit()
Gets the last Unit on this tile. |
Unit |
IndianSettlement.getLastUnit()
|
Unit |
Europe.getLastUnit()
Gets the last Unit in this Europe . |
Unit |
ColonyTile.getLastUnit()
Gets the Unit currently working on this ColonyTile . |
Unit |
Building.getLastUnit()
Gets the last unit in this building. |
Unit |
PlayerExploredTile.getMissionary()
|
Unit |
IndianSettlement.getMissionary()
Returns the missionary from this settlement if there is one or null if there is none. |
Unit |
Tile.getMovableUnit()
Gets a Unit that can become active. |
Unit |
Player.getNextActiveUnit()
Gets a new active unit. |
Unit |
Player.getNextGoingToUnit()
Gets a new going_to unit. |
Unit |
Tile.getOccupyingUnit()
Returns the unit who is occupying the tile |
Unit |
ColonyTile.getOccupyingUnit()
Returns the unit who is occupying the tile |
Unit |
Colony.getRandomUnit()
Returns a random unit from this colony. |
Unit |
Unit.getStudent()
Get the Student value. |
Unit |
Unit.getTeacher()
Get the Teacher value. |
Unit |
UnitTradeItem.getUnit()
Get the Unit value. |
Unit |
ColonyTile.getUnit()
Gets the Unit currently working on this ColonyTile . |
Unit |
Player.getUnit(java.lang.String id)
Get the Unit value. |
Unit |
Player.UnitIterator.next()
|
Methods in net.sf.freecol.common.model that return types with arguments of type Unit | |
---|---|
java.util.List<Unit> |
TradeRoute.getAssignedUnits()
|
java.util.Iterator<Unit> |
IndianSettlement.getOwnedUnitsIterator()
Gets an iterator over all the units this IndianSettlement is owning. |
static java.util.Comparator<Unit> |
Unit.getSkillLevelComparator()
|
java.util.List<Unit> |
Colony.getTeachers()
|
java.util.Iterator<Unit> |
Unit.getUnitIterator()
Gets a Iterator of every Unit directly
located on this Location . |
java.util.Iterator<Unit> |
Tile.getUnitIterator()
Gets an Iterator of every Unit directly
located on this Tile . |
java.util.Iterator<Unit> |
Player.getUnitIterator()
Gets an Iterator containing all the units this player
owns. |
java.util.Iterator<Unit> |
Location.getUnitIterator()
Gets a Iterator of every Unit directly
located on this Location . |
java.util.Iterator<Unit> |
IndianSettlement.getUnitIterator()
|
java.util.Iterator<Unit> |
Europe.getUnitIterator()
Gets an Iterator of every Unit directly
located in this Europe . |
java.util.Iterator<Unit> |
ColonyTile.getUnitIterator()
|
java.util.Iterator<Unit> |
Colony.getUnitIterator()
|
java.util.Iterator<Unit> |
Building.getUnitIterator()
Gets an Iterator of every Unit directly
located on this Building . |
java.util.List<Unit> |
Unit.getUnitList()
|
java.util.List<Unit> |
Tile.getUnitList()
Gets a List/code> of every |
java.util.List<Unit> |
Location.getUnitList()
Returns a list containing all the Units present at this Location. |
java.util.List<Unit> |
IndianSettlement.getUnitList()
|
java.util.List<Unit> |
Europe.getUnitList()
Gets a List of every Unit directly located
in this Europe . |
java.util.List<Unit> |
ColonyTile.getUnitList()
|
java.util.List<Unit> |
Colony.getUnitList()
|
java.util.List<Unit> |
Building.getUnitList()
|
java.util.List<Unit> |
Player.getUnits()
|
Methods in net.sf.freecol.common.model with parameters of type Unit | |
---|---|
void |
IndianSettlement.addOwnedUnit(Unit unit)
Adds the given Unit to the list of units that belongs to this
IndianSettlement . |
void |
Tile.addUnitNoUpdate(Unit unit)
Adds the unit to the tile. |
void |
Unit.adjustTension(Unit enemyUnit)
Adjusts the tension and alarm levels of the enemy unit's owner according to the type of attack. |
boolean |
IndianSettlement.allowContact(Unit unit)
Is a unit permitted to contact with this settlement? The unit must be from a nation that has already contacted, or in the first instance must be arriving by land (apparently including ships in adjacent ports in Col1). |
void |
SimpleCombatModel.attack(Unit attacker,
Unit defender,
CombatModel.CombatResult result,
int plunderGold,
Location repairLocation)
Attack a unit with the given outcome. |
void |
CombatModel.attack(Unit attacker,
Unit defender,
CombatModel.CombatResult result,
int plunderGold,
Location repairLocation)
Attack a unit with the given outcome. |
void |
Unit.boardShip(Unit carrier)
Boards a carrier that is on the same tile. |
void |
SimpleCombatModel.bombard(Colony colony,
Unit defender,
CombatModel.CombatResult result,
Location repairLocation)
Bombard a unit with the given outcome. |
void |
CombatModel.bombard(Colony colony,
Unit defender,
CombatModel.CombatResult result,
Location repairLocation)
Bombard a unit with the given outcome. |
CombatModel.CombatOdds |
SimpleCombatModel.calculateCombatOdds(Unit attacker,
Unit defender)
Calculates the chance of the outcomes of combat between the units. |
CombatModel.CombatOdds |
CombatModel.calculateCombatOdds(Unit attacker,
Unit defender)
Calculates the chance of the outcomes of combat between the units. |
boolean |
Unit.canBeStudent(Unit teacher)
Returns true if this unit can be a student. |
boolean |
Colony.canTrain(Unit unit)
Returns true if this colony has a schoolhouse and the unit type is a skilled unit type with a skill level not exceeding the level of the schoolhouse. |
void |
SimpleCombatModel.captureColony(Unit attacker,
Colony colony,
int plunderGold,
Location repairLocation)
Captures an enemy colony and plunders gold. |
void |
Unit.captureGoods(Unit enemyUnit)
Captures the goods on board of the enemy unit. |
void |
Unit.embark(Unit unit)
Embarks this unit onto the specified unit. |
PathNode |
Map.findPath(Unit unit,
Tile start,
Tile end)
Finds a shortest path between the given tiles. |
PathNode |
Map.findPath(Unit unit,
Tile start,
Tile end,
CostDecider costDecider)
Finds a shortest path between the given tiles. |
PathNode |
Map.findPath(Unit unit,
Tile start,
Tile end,
Unit carrier)
Finds a shortest path between the given tiles. |
PathNode |
Map.findPath(Unit unit,
Tile start,
Tile end,
Unit carrier,
CostDecider costDecider)
Finds a shortest path between the given tiles. |
PathNode |
Map.findPathToEurope(Unit unit,
Tile start)
Finds the best path to Europe . |
PathNode |
Map.findPathToEurope(Unit unit,
Tile start,
CostDecider costDecider)
Finds the best path to Europe . |
Unit |
Building.findStudent(Unit teacher)
|
Unit |
Colony.findTeacher(Unit unit)
|
CombatModel.CombatResult |
SimpleCombatModel.generateAttackResult(Colony colony,
Unit defender)
Generates the result of a colony bombarding a Unit. |
CombatModel.CombatResult |
CombatModel.generateAttackResult(Colony colony,
Unit defender)
Generates the result of a colony bombarding a Unit. |
CombatModel.CombatResult |
SimpleCombatModel.generateAttackResult(Unit attacker,
Unit defender)
Generates a result of an attack. |
CombatModel.CombatResult |
CombatModel.generateAttackResult(Unit attacker,
Unit defender)
Generates a result of an attack. |
int |
Building.getAdditionalProduction(Unit addUnit)
Returns the maximum production of a given unit to be added to this building. |
int |
Building.getAdditionalProductionNextTurn(Unit addUnit)
Returns the additional production of new Unit at this building for next turn. |
static java.lang.String |
SimpleCombatModel.getApparentOwnerName(Unit unit)
Get the name of the apparent owner of this Unit, (like getOwner().getNationAsString() but handles pirates) |
Building |
Colony.getBuildingFor(Unit unit)
Return the Building best suited for the given Unit. |
float |
SimpleCombatModel.getDefencePower(Colony colony,
Unit defender)
Return the defensive power of the defender versus the bombarding colony. |
float |
CombatModel.getDefencePower(Colony colony,
Unit defender)
Return the defensive power of the defender versus the bombarding colony. |
float |
SimpleCombatModel.getDefencePower(Unit attacker,
Unit defender)
Return the defensive power of the defender versus the attacker. |
float |
CombatModel.getDefencePower(Unit attacker,
Unit defender)
Return the defensive power of the defender versus the attacker. |
Unit |
Tile.getDefendingUnit(Unit attacker)
Gets the Unit that is currently defending this
Tile . |
abstract Unit |
Settlement.getDefendingUnit(Unit attacker)
Gets the Unit that is currently defending this Settlement . |
Unit |
IndianSettlement.getDefendingUnit(Unit attacker)
Gets the Unit that is currently defending this IndianSettlement . |
Unit |
Colony.getDefendingUnit(Unit attacker)
Gets the Unit that is currently defending this
Colony . |
java.util.Set<Modifier> |
SimpleCombatModel.getDefensiveModifiers(Colony colony,
Unit defender)
Return a list of all defensive modifiers that apply to the defender versus the bombarding colony. |
java.util.Set<Modifier> |
CombatModel.getDefensiveModifiers(Colony colony,
Unit defender)
Return a list of all defensive modifiers that apply to the defender versus the bombarding colony. |
java.util.Set<Modifier> |
SimpleCombatModel.getDefensiveModifiers(Unit attacker,
Unit defender)
Return a list of all defensive modifiers that apply to the defender versus the attacker. |
java.util.Set<Modifier> |
CombatModel.getDefensiveModifiers(Unit attacker,
Unit defender)
Return a list of all defensive modifiers that apply to the defender versus the attacker. |
float |
SimpleCombatModel.getOffencePower(Colony colony,
Unit defender)
Returns the power for bombarding |
float |
CombatModel.getOffencePower(Colony colony,
Unit defender)
Returns the power for bombarding |
float |
SimpleCombatModel.getOffencePower(Unit attacker,
Unit defender)
Return the offensive power of the attacker versus the defender. |
float |
CombatModel.getOffencePower(Unit attacker,
Unit defender)
Return the offensive power of the attacker versus the defender. |
java.util.Set<Modifier> |
SimpleCombatModel.getOffensiveModifiers(Colony colony,
Unit defender)
Return a list of all offensive modifiers that apply to the attacker versus the defender. |
java.util.Set<Modifier> |
CombatModel.getOffensiveModifiers(Colony colony,
Unit defender)
Return a list of all offensive modifiers that apply to the attacker versus the defender. |
java.util.Set<Modifier> |
SimpleCombatModel.getOffensiveModifiers(Unit attacker,
Unit defender)
Return a list of all offensive modifiers that apply to the attacker versus the defender. |
java.util.Set<Modifier> |
CombatModel.getOffensiveModifiers(Unit attacker,
Unit defender)
Return a list of all offensive modifiers that apply to the attacker versus the defender. |
int |
ColonyTile.getProductionOf(Unit unit,
GoodsType goodsType)
Returns the production of the given type of goods which would be produced by the given unit |
Location |
Player.getRepairLocation(Unit unit)
Returns the closest Location in which the given ship can
get repaired. |
java.util.List<AbstractGoods> |
Tile.getSortedPotential(Unit unit)
Sorts GoodsTypes according to potential based on TileType, TileItemContainer if any. |
int |
Building.getUnitProductivity(Unit prodUnit)
Returns the maximum productivity of a unit working in this building. |
ColonyTile |
Colony.getVacantColonyTileFor(Unit unit,
boolean allowClaim,
GoodsType... goodsTypes)
Returns a vacant ColonyTile where the given
unit produces the maximum output of the given
goodsType . |
WorkLocation |
Colony.getVacantWorkLocationFor(Unit unit)
Gets a vacant WorkLocation for the given Unit . |
GoodsType |
ColonyTile.getWorkType(Unit unit)
Returns a worktype for a unit. |
static boolean |
TradeRoute.isStopValid(Unit unit,
TradeRoute.Stop stop)
|
boolean |
TileImprovementType.isWorkerAllowed(Unit unit)
Check if a given Unit can perform this TileImprovement. |
boolean |
TileImprovement.isWorkerAllowed(Unit unit)
Checks if a given worker can work at this Improvement |
void |
Goods.loadOnto(Unit carrier)
Loads the cargo onto a carrier that is on the same tile. |
void |
Unit.moveToFront(Unit u)
Move the given unit to the front of this carrier (make sure it'll be the first unit in this unit's unit list). |
abstract boolean |
Player.UnitPredicate.obtains(Unit unit)
|
boolean |
Player.ActivePredicate.obtains(Unit unit)
Returns true if the unit is active (and going nowhere). |
boolean |
Player.GoingToPredicate.obtains(Unit unit)
Returns true if the unit has order to go somewhere. |
void |
Europe.recruit(int slot,
Unit unit,
UnitType newRecruitable)
Recruits a unit from Europe. |
boolean |
IndianSettlement.removeOwnedUnit(Unit unit)
Removes the given Unit to the list of units that
belongs to this IndianSettlement . |
void |
Player.removeUnit(Unit oldUnit)
Remove Unit. |
void |
Tile.removeUnitNoUpdate(Unit unit)
Removes the unit from the tile. |
PathNode |
Map.search(Unit unit,
GoalDecider gd,
int maxTurns)
Finds a path to a goal determined by the given GoalDecider . |
PathNode |
Map.search(Unit unit,
GoalDecider gd,
int maxTurns,
Unit carrier)
Finds a path to a goal determined by the given GoalDecider . |
PathNode |
Map.search(Unit unit,
Tile startTile,
GoalDecider gd,
CostDecider costDecider,
int maxTurns)
Finds a path to a goal determined by the given GoalDecider . |
PathNode |
Map.search(Unit unit,
Tile startTile,
GoalDecider gd,
CostDecider costDecider,
int maxTurns,
Unit carrier)
Finds a path to a goal determined by the given GoalDecider . |
PathNode |
Map.search(Unit unit,
Tile startTile,
GoalDecider gd,
int maxTurns)
Finds a path to a goal determined by the given GoalDecider . |
PathNode |
Map.search(Unit unit,
Tile startTile,
GoalDecider gd,
int maxTurns,
Unit carrier)
Finds a path to a goal determined by the given GoalDecider . |
void |
Player.setExplored(Unit unit)
Sets the tiles within the given Unit 's line of sight to
be explored by this player. |
void |
PlayerExploredTile.setMissionary(Unit missionary)
|
void |
IndianSettlement.setMissionary(Unit missionary)
Sets the missionary for this settlement. |
void |
Unit.setStudent(Unit newStudent)
Set the Student value. |
void |
Unit.setTeacher(Unit newTeacher)
Set the Teacher value. |
Location |
ModelController.setToVacantEntryLocation(Unit unit)
Puts the specified Unit in America. |
void |
UnitTradeItem.setUnit(Unit newUnit)
Set the Unit value. |
void |
Player.setUnit(Unit newUnit)
Set the Unit value. |
void |
ColonyTile.setUnit(Unit unit)
Sets a Unit to this ColonyTile . |
void |
Unit.switchEquipmentWith(Unit unit)
Switches equipment between colonists |
void |
ModelController.tileImprovementFinished(Unit unit,
TileImprovement improvement)
Tells the ModelController that a tile improvement was finished |
void |
Europe.train(Unit unit)
Train or purchase a unit in Europe. |
Constructors in net.sf.freecol.common.model with parameters of type Unit | |
---|---|
IndianSettlement(Game game,
Player player,
Tile tile,
java.lang.String name,
boolean isCapital,
UnitType learnableSkill,
java.util.Set<Player> isVisited,
Unit missionary)
The constructor to use. |
|
UnitTradeItem(Game game,
Player source,
Player destination,
Unit unit)
Creates a new UnitTradeItem instance. |
Uses of Unit in net.sf.freecol.common.model.pathfinding |
---|
Methods in net.sf.freecol.common.model.pathfinding with parameters of type Unit | |
---|---|
boolean |
GoalDecider.check(Unit u,
PathNode pathNode)
Checks wether the given PathNode is a
goal/sub-goal. |
static CostDecider |
CostDeciders.defaultFor(Unit unit)
Selects a default CostDecider for the given units. |
int |
CostDecider.getCost(Unit unit,
Tile oldTile,
Tile newTile,
int movesLeftBefore,
int turns)
Determines the cost of a single move. |
Uses of Unit in net.sf.freecol.common.networking |
---|
Methods in net.sf.freecol.common.networking that return Unit | |
---|---|
Unit |
DiplomacyMessage.getUnit()
Get the Unit which began this diplomatic exchange. |
Unit |
DeliverGiftMessage.getUnit()
Get the Unit which is delivering the gift. |
Constructors in net.sf.freecol.common.networking with parameters of type Unit | |
---|---|
BuildColonyMessage(java.lang.String colonyName,
Unit builder)
Create a new BuildColonyMessage with the supplied name
and building unit. |
|
BuyMessage(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Create a new BuyMessage . |
|
BuyPropositionMessage(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Create a new BuyPropositionMessage . |
|
CashInTreasureTrainMessage(Unit unit)
Create a new CashInTreasureTrainMessage with the
supplied name. |
|
CloseTransactionMessage(Unit unit,
Settlement settlement)
Create a new CloseTransactionMessage with the supplied
unit and settlement. |
|
DeliverGiftMessage(Unit unit,
Settlement settlement,
Goods goods)
Create a new DeliverGiftMessage . |
|
DiplomacyMessage(Unit unit,
Map.Direction direction,
DiplomaticTrade agreement)
Create a new DiplomacyMessage with the
supplied unit, direction and agreement. |
|
DisembarkMessage(Unit unit)
Create a new DisembarkMessage with the
supplied name. |
|
GetTransactionMessage(Unit unit,
Settlement settlement)
Create a new GetTransactionMessage with the supplied unit
and settlement. |
|
GoodsForSaleMessage(Unit unit,
Settlement settlement)
Create a new GoodsForSaleMessage with the supplied name. |
|
JoinColonyMessage(Colony colony,
Unit builder)
Create a new JoinColonyMessage with the supplied name
and building unit. |
|
SellMessage(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Create a new SellMessage . |
|
SellPropositionMessage(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Create a new SellPropositionMessage . |
|
SetDestinationMessage(Unit unit,
Location destination)
Create a new SetDestinationMessage with the supplied unit
and destination. |
|
SpySettlementMessage(Unit unit,
Map.Direction direction)
Create a new SpySettlementMessage with the
supplied unit and direction. |
|
UpdateCurrentStopMessage(Unit unit)
Create a new UpdateCurrentStopMessage for the
supplied unit. |
Uses of Unit in net.sf.freecol.server |
---|
Methods in net.sf.freecol.server that return Unit | |
---|---|
Unit |
FreeColServer.getUnitSafely(java.lang.String unitId,
ServerPlayer serverPlayer)
Get a unit by ID, validating the ID as much as possible. |
Methods in net.sf.freecol.server with parameters of type Unit | |
---|---|
IndianSettlement |
FreeColServer.getAdjacentIndianSettlementSafely(java.lang.String settlementId,
Unit unit)
Get an adjacent Indian settlement by ID, validating as much as possible, including checking whether the nation involved has been contacted. |
Settlement |
FreeColServer.getAdjacentSettlementSafely(java.lang.String settlementId,
Unit unit)
Get a settlement by ID, validating the ID as much as possible. |
Uses of Unit in net.sf.freecol.server.ai |
---|
Methods in net.sf.freecol.server.ai that return Unit | |
---|---|
static Unit |
AIColony.bestUnitForWorkLocation(java.util.Collection<Unit> units,
WorkLocation workLocation,
GoodsType goodsType)
|
Unit |
NewAIPlayer.getBestTreasureTrain(Tile tile)
Deprecated. Returns the treasure train carrying the largest treasure located on the given Tile . |
Unit |
ProductionCache.Entry.getUnit()
|
Unit |
AIUnit.getUnit()
Gets the Unit this AIUnit controls. |
Methods in net.sf.freecol.server.ai that return types with arguments of type Unit | |
---|---|
java.util.Set<Unit> |
ProductionCache.getUnits()
|
Methods in net.sf.freecol.server.ai with parameters of type Unit | |
---|---|
boolean |
StandardAIPlayer.acceptIndianDemand(Unit unit,
Colony colony,
Goods goods,
int gold)
Decides whether to accept an Indian demand, or not. |
boolean |
REFAIPlayer.acceptIndianDemand(Unit unit,
Colony colony,
Goods goods,
int gold)
Deprecated. Decides whether to accept an Indian demand, or not. |
abstract boolean |
EuropeanAIPlayer.acceptIndianDemand(Unit unit,
Colony colony,
Goods goods,
int gold)
Deprecated. Decides whether to accept an Indian demand, or not. |
boolean |
ColonialAIPlayer.acceptIndianDemand(Unit unit,
Colony colony,
Goods goods,
int gold)
Decides whether to accept an Indian demand, or not. |
abstract boolean |
AIPlayer.acceptIndianDemand(Unit unit,
Colony colony,
Goods goods,
int gold)
Decides whether to accept an Indian demand, or not. |
int |
StandardAIPlayer.buyProposition(Unit unit,
Goods goods,
int gold)
Called when another Player proposes a trade. |
int |
NewAIPlayer.buyProposition(Unit unit,
Goods goods,
int gold)
Deprecated. Called when another Player proposes a trade. |
int |
ColonialAIPlayer.buyProposition(Unit unit,
Goods goods,
int gold)
Called when another Player proposes a trade. |
abstract int |
AIPlayer.buyProposition(Unit unit,
Goods goods,
int gold)
Called when another Player proposes a trade. |
static java.util.List<ProductionCache.Entry> |
ProductionCache.removeEntries(Unit unit,
WorkLocation workLocation,
java.util.List<ProductionCache.Entry> entryList)
|
int |
StandardAIPlayer.tradeProposition(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Called when another Player proposes a trade. |
int |
IndianAIPlayer.tradeProposition(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Deprecated. Called when another Player proposes a trade. |
int |
EuropeanAIPlayer.tradeProposition(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Deprecated. Called when another Player proposes a trade. |
int |
ColonialAIPlayer.tradeProposition(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Called when another Player proposes a trade. |
abstract int |
AIPlayer.tradeProposition(Unit unit,
Settlement settlement,
Goods goods,
int gold)
Called when another Player proposes a trade. |
Method parameters in net.sf.freecol.server.ai with type arguments of type Unit | |
---|---|
static Unit |
AIColony.bestUnitForWorkLocation(java.util.Collection<Unit> units,
WorkLocation workLocation,
GoodsType goodsType)
|
Constructors in net.sf.freecol.server.ai with parameters of type Unit | |
---|---|
AIUnit(AIMain aiMain,
Unit unit)
Creates a new AIUnit . |
|
ProductionCache.Entry(GoodsType g,
WorkLocation w,
Unit u)
|
Uses of Unit in net.sf.freecol.server.ai.mission |
---|
Methods in net.sf.freecol.server.ai.mission that return Unit | |
---|---|
Unit |
Mission.getUnit()
Gets the unit this mission has been created for. |
Methods in net.sf.freecol.server.ai.mission with parameters of type Unit | |
---|---|
void |
Mission.attack(Connection connection,
Unit unit,
Map.Direction direction)
|
boolean |
Mission.buyGoods(Connection connection,
Unit carrier,
GoodsType goodsType,
int amount)
|
static Tile |
BuildColonyMission.findColonyLocation(Unit unit)
Finds a site for a new colony. |
PathNode |
Mission.findNearestColony(Unit unit)
|
static int |
PrivateerMission.getModifierValueForTarget(CombatModel combatModel,
Unit attacker,
Unit defender)
Calculates the modifier used when assessing the value of a target to a privateer Note: it gives a modifier value, other parameters should be considered as well Note: we assume the unit given is a privateer, no test is made |
static int |
TransportMission.getPlayerNavalTransportMissionCount(AIPlayer aiPlayer,
Unit unitExcluded)
Gives the number of naval units assigned with a Transport Mission |
Uses of Unit in net.sf.freecol.server.control |
---|
Methods in net.sf.freecol.server.control that return Unit | |
---|---|
Unit |
ServerModelController.createUnit(java.lang.String taskID,
Location location,
Player owner,
UnitType type)
Creates a new unit. |
Unit |
ServerModelController.createUnit(java.lang.String taskID,
Location location,
Player owner,
UnitType type,
boolean secure,
Connection connection)
Creates a new unit. |
Methods in net.sf.freecol.server.control that return types with arguments of type Unit | |
---|---|
java.util.List<Unit> |
InGameController.createREFUnits(ServerPlayer player,
ServerPlayer refPlayer)
|
Methods in net.sf.freecol.server.control with parameters of type Unit | |
---|---|
void |
InGameController.closeTransactionSession(Unit unit,
Settlement settlement)
|
boolean |
InGameController.createMission(IndianSettlement settlement,
Unit missionary)
|
java.util.Map<java.lang.String,java.lang.Object> |
InGameController.getTransactionSession(Unit unit,
Settlement settlement)
|
boolean |
InGameController.isTransactionSessionOpen(Unit unit,
Settlement settlement)
|
void |
InGameController.sendRemoveUnitToAll(Unit unit,
ServerPlayer serverPlayer)
Tell all players to remove a unit, optionally excluding one player. |
Location |
ServerModelController.setToVacantEntryLocation(Unit unit)
Puts the specified Unit in America. |
void |
ServerModelController.tileImprovementFinished(Unit unit,
TileImprovement improvement)
Tells the ModelController that a tile improvement was finished |
void |
ServerModelController.update(Unit unit,
Player p)
Sends an update of the unit to the other players. |
Uses of Unit in net.sf.freecol.server.model |
---|
Methods in net.sf.freecol.server.model with parameters of type Unit | |
---|---|
ModelMessage |
ServerPlayer.cashInTreasureTrain(Unit unit)
Cash in a treasure train. |
void |
ServerPlayer.setExplored(Unit unit)
Sets the tiles within the given Unit 's line of
sight to be explored by this player. |
|
||||||||||
PREV NEXT | FRAMES NO FRAMES |