rl.centurion.game
Class PointDefenceAllocation
java.lang.Object
rl.centurion.game.PointDefenceAllocation
- All Implemented Interfaces:
- java.io.Serializable
public class PointDefenceAllocation
- extends java.lang.Object
- implements java.io.Serializable
This class encapsulates any point defence allocation against missile attacks.
It is written to handle a vehicle having more than one point defence system even though
none of the default vehicles in the game carries any more than one.
- See Also:
- Serialized Form
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
serialVersionUID
static final long serialVersionUID
- See Also:
- Constant Field Values
PointDefenceAllocation
public PointDefenceAllocation(GameElementIdentifier source,
GameElementIdentifier target,
java.util.Vector<EquipmentMount> systems,
java.util.Vector<java.lang.String> attacks,
int additionalAttacks)
- Parameters:
source - The identifier of the element the missile attack originated fromtarget - The identifier of the target of the missile attacksystems - A List of the Point Defense systems on the targetattacks - A List of the missiles that have successfully attacked the targetadditionalAttacks - A count of the attacks aimed that the target that are yet to be resolved in this combat phase
getSource
public GameElementIdentifier getSource()
getTarget
public GameElementIdentifier getTarget()
getAdditionalAttacks
public int getAdditionalAttacks()
getShotsAllocated
public int getShotsAllocated()
getShotsRemaining
public int getShotsRemaining()
areShotsAllocated
public boolean areShotsAllocated()
getPointDefenceSystemCount
public int getPointDefenceSystemCount()
getPointDefenceSystem
public PointDefenceAllocation.PointDefenceSystem getPointDefenceSystem(int index)
getMissileAttacks
public java.util.Vector<java.lang.String> getMissileAttacks()
setMissileAttacks
public void setMissileAttacks(java.util.Vector<java.lang.String> attacks)
setAdditionalAttacks
public void setAdditionalAttacks(int additionalAttacks)
shotSpecifiedForAttack
public boolean shotSpecifiedForAttack(int index)
systemSpecifiedForAttack
public PointDefenceAllocation.PointDefenceSystem systemSpecifiedForAttack(int index)
allocateShots
public void allocateShots(int systemIndex,
int shots)
specifyShot
public void specifyShot(int systemIndex,
int shotIndex)
unspecifyShot
public void unspecifyShot(int systemIndex,
int shotIndex)