|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrl.common.game.elements.GameElement
rl.common.game.elements.InfantrySquad
public class InfantrySquad
| Nested Class Summary | |
|---|---|
static class |
InfantrySquad.SquadType
|
| Nested classes/interfaces inherited from class rl.common.game.elements.GameElement |
|---|
GameElement.StatusPhase |
| Field Summary | |
|---|---|
(package private) static long |
serialVersionUID
|
| Constructor Summary | |
|---|---|
InfantrySquad()
|
|
InfantrySquad(InfantrySquad.SquadType squadType)
|
|
InfantrySquad(java.lang.String typeName)
|
|
| Method Summary | |
|---|---|
void |
addCasualties(int turn,
int casualties)
|
void |
addDamageListener(InfantrySquadDamageListener l)
|
void |
addFiringListener(InfantrySquadFiringListener l)
|
void |
addMovementListener(InfantrySquadMovementListener l)
|
void |
addPaintingListener(InfantrySquadPaintingListener l)
|
void |
addReinforcements(int turn,
int troops,
InfantrySquad.SquadType troopType)
|
void |
applyDamageSummary(GameElementDamageSummary geds)
|
void |
applyFiringSummary(GameElementFiringSummary gefs)
function called to apply firing summary to element. |
void |
applyMovementSummary(GameElementMovementSummary gems)
applies the summary of movement to the element. |
void |
applyPaintingSummary(GameElementPaintingSummary geps)
This routine will synch the painting summary information from the element on the server to the one on the client. |
GameElementDamageSummary |
calculateStatus(int turn,
GameElement.StatusPhase phase)
|
boolean |
canFire(int turn)
Returns whether this unit can make a firing attempt on a particular turn |
boolean |
canFireIndirect(int turn)
Returns whether this unit can make an indirect firing attempt on a particular turn |
boolean |
canMove(int turn)
returns whether the element can move in a given turn |
boolean |
canPaint(int turn)
Returns whether this unit can make a painting attempt on a particular turn |
void |
clearConcealment(int turn)
Sets the state of the element to not concealed |
void |
consumeTVLG()
|
boolean |
didDisembark(int turn)
checks whether the infantry squad was disembarked this turn |
double |
getDamageSummary(int turn)
|
java.lang.String |
getElementType()
|
GameElementFiringSummary |
getFiringSummary(int turn)
get a new GameElementFiringSummary object appropriate to the object implementing this interface |
Weapon |
getInfantryFireWeapon(int turn)
|
double |
getInternalDamageSummary(int turn)
|
int |
getMaximumPaintingRange()
Returns the maximum range at which this element can paint a target |
int |
getMortars(int turn)
|
GameElementMovementSummary |
getMovementSummary(int turn)
return a new GameElementMovementSummary appropriate for the element implementing this interface |
java.lang.String |
getName()
|
GameElementPaintingSummary |
getPaintingSummary(int turn)
returns a new GameElementPaintingSummary appropriate to the object implementing this interface |
int |
getStrength(int turn)
|
int |
getTurnDestroyed()
|
int |
getTVLGs(int turn)
|
InfantrySquad.SquadType |
getType()
|
java.lang.String |
getUnitType()
|
java.util.Vector<Weapon> |
getWeapons(int turn,
int range,
boolean targetMoved)
|
boolean |
hasInternalStructure()
|
boolean |
hasMoved(int turn)
returns whether a unit has moved in a given turn |
boolean |
hasPainted(int turn)
Returns whether this unit made a painting attempt on a particular turn |
boolean |
isConcealed(int turn)
if the element is concealed on the turn supplied |
boolean |
isDestroyed(int turn)
|
void |
removeDamageListener(InfantrySquadDamageListener l)
|
void |
removeFiringListener(InfantrySquadFiringListener l)
|
void |
removeMovementListener(InfantrySquadMovementListener l)
|
void |
removePaintingListener(InfantrySquadPaintingListener l)
|
void |
setConcealed(int turn)
Sets this element into a concealed state |
void |
setDisembarked(int turn)
Notify that the infantry squad disembarked this turn |
void |
setMadePaintingAttempt(int turn)
Sets that this unit has made a painting attempt on this turn |
void |
setMoved(int turn)
sets the status of an element that has moved in a given turn |
java.lang.String |
toString()
|
void |
weaponFired(java.lang.String weaponName,
java.lang.String ammoType,
int weaponIndex)
This is called when an element fires a weapon |
| Methods inherited from class rl.common.game.elements.GameElement |
|---|
equals, getID, getIdentifier, getUnit, hashCode, setUnit |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
static final long serialVersionUID
| Constructor Detail |
|---|
public InfantrySquad()
public InfantrySquad(InfantrySquad.SquadType squadType)
public InfantrySquad(java.lang.String typeName)
| Method Detail |
|---|
public java.lang.String getName()
getName in class GameElementpublic int getTurnDestroyed()
public boolean isDestroyed(int turn)
isDestroyed in class GameElementpublic void addMovementListener(InfantrySquadMovementListener l)
public void removeMovementListener(InfantrySquadMovementListener l)
public void addPaintingListener(InfantrySquadPaintingListener l)
public void removePaintingListener(InfantrySquadPaintingListener l)
public void addFiringListener(InfantrySquadFiringListener l)
public void removeFiringListener(InfantrySquadFiringListener l)
public void addDamageListener(InfantrySquadDamageListener l)
public void removeDamageListener(InfantrySquadDamageListener l)
public InfantrySquad.SquadType getType()
public int getStrength(int turn)
public int getMortars(int turn)
public int getTVLGs(int turn)
public void consumeTVLG()
public void addCasualties(int turn,
int casualties)
public void addReinforcements(int turn,
int troops,
InfantrySquad.SquadType troopType)
public java.lang.String getUnitType()
public java.lang.String toString()
toString in class GameElementpublic java.lang.String getElementType()
getElementType in class GameElementpublic Weapon getInfantryFireWeapon(int turn)
public GameElementDamageSummary calculateStatus(int turn,
GameElement.StatusPhase phase)
calculateStatus in class GameElementpublic void applyDamageSummary(GameElementDamageSummary geds)
applyDamageSummary in class GameElementpublic boolean hasInternalStructure()
hasInternalStructure in class GameElementpublic double getDamageSummary(int turn)
getDamageSummary in class GameElementpublic double getInternalDamageSummary(int turn)
getInternalDamageSummary in class GameElementpublic boolean canMove(int turn)
MovementCapableElement
canMove in interface MovementCapableElementpublic boolean hasMoved(int turn)
MovementCapableElement
hasMoved in interface MovementCapableElementpublic void setMoved(int turn)
MovementCapableElement
setMoved in interface MovementCapableElementpublic GameElementMovementSummary getMovementSummary(int turn)
MovementCapableElement
getMovementSummary in interface MovementCapableElementpublic void applyMovementSummary(GameElementMovementSummary gems)
MovementCapableElement
applyMovementSummary in interface MovementCapableElementpublic boolean canPaint(int turn)
PaintingCapableElement
canPaint in interface PaintingCapableElementpublic boolean hasPainted(int turn)
PaintingCapableElement
hasPainted in interface PaintingCapableElementpublic void setMadePaintingAttempt(int turn)
PaintingCapableElement
setMadePaintingAttempt in interface PaintingCapableElementpublic int getMaximumPaintingRange()
PaintingCapableElement
getMaximumPaintingRange in interface PaintingCapableElementpublic GameElementPaintingSummary getPaintingSummary(int turn)
PaintingCapableElement
getPaintingSummary in interface PaintingCapableElementpublic void applyPaintingSummary(GameElementPaintingSummary geps)
PaintingCapableElement
applyPaintingSummary in interface PaintingCapableElementpublic boolean canFire(int turn)
FiringCapableElement
canFire in interface FiringCapableElementturn - The turn that we're checking the element can fire
public boolean canFireIndirect(int turn)
FiringCapableElement
canFireIndirect in interface FiringCapableElementturn - The turn that we're checking the element can fire indirectly
public GameElementFiringSummary getFiringSummary(int turn)
FiringCapableElement
getFiringSummary in interface FiringCapableElementpublic void applyFiringSummary(GameElementFiringSummary gefs)
FiringCapableElement
applyFiringSummary in interface FiringCapableElementgefs - Applies all of the firing information contained in the GameElementFiringSummary.
This is primarily used to capture ammunition expenditure
public void weaponFired(java.lang.String weaponName,
java.lang.String ammoType,
int weaponIndex)
FiringCapableElement
weaponFired in interface FiringCapableElementweaponName - The name of the weapon system firingammoType - The ammo type used in the firing attemptweaponIndex - The index of the weapon system firing
public java.util.Vector<Weapon> getWeapons(int turn,
int range,
boolean targetMoved)
public boolean isConcealed(int turn)
ConcealableElement
isConcealed in interface ConcealableElementturn - the turn used to check concealment
public void setConcealed(int turn)
ConcealableElement
setConcealed in interface ConcealableElementturn - the turn which the element is concealedpublic void clearConcealment(int turn)
ConcealableElement
clearConcealment in interface ConcealableElementturn - the turn that the concealment is liftedpublic void setDisembarked(int turn)
turn - the turn of dismbarkationpublic boolean didDisembark(int turn)
turn - the turn in question
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||