games.strategy.triplea.delegate
Class StrategicBombingRaidBattle

java.lang.Object
  extended by games.strategy.triplea.delegate.StrategicBombingRaidBattle

public class StrategicBombingRaidBattle
extends java.lang.Object

Version:
1.0
Author:
Sean Bridges
See Also:
Serialized Form

Constructor Summary
StrategicBombingRaidBattle(Territory territory, GameData data, PlayerID attacker, PlayerID defender, BattleTracker tracker)
          Creates new StrategicBombingRaidBattle
 
Method Summary
 Change addAttackChange(Route route, java.util.Collection<Unit> units)
          Add a bunch of attacking units to the battle.
 void addBombardingUnit(Unit unit)
          Add bombarding unit.
 boolean equals(java.lang.Object o)
           
 void fight(IDelegateBridge bridge)
          Fight this battle.
 java.util.Collection<Unit> getAmphibiousLandAttackers()
          Return units which are actually assaulting amphibiously
 int getBattleRound()
           
 java.util.Collection<Unit> getBombardingUnits()
          Return units which are actually bombarding
 java.util.Collection<Unit> getDependentUnits(java.util.Collection<Unit> units)
          Return units which are dependent on the given units.
 Territory getTerritory()
          Return what territory this battle is occuring in.
 int hashCode()
           
 boolean isAmphibious()
          Return whether battle is amphibious.
 boolean isBombingRun()
          Return whether this battle is a bombing run.
 boolean isEmpty()
          After an attack has been removed, you can use this to test if there are still units left to fight
 boolean isOver()
          Return whether this battle is over or not.
 void removeAttack(Route route, java.util.Collection<Unit> units)
          This occurs when a move has been undone
 void unitsLostInPrecedingBattle(games.strategy.triplea.delegate.Battle battle, java.util.Collection<Unit> units, IDelegateBridge bridge)
          Call this method when units are lost in another battle.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StrategicBombingRaidBattle

public StrategicBombingRaidBattle(Territory territory,
                                  GameData data,
                                  PlayerID attacker,
                                  PlayerID defender,
                                  BattleTracker tracker)
Creates new StrategicBombingRaidBattle

Method Detail

isOver

public boolean isOver()
Return whether this battle is over or not.


isEmpty

public boolean isEmpty()
After an attack has been removed, you can use this to test if there are still units left to fight


removeAttack

public void removeAttack(Route route,
                         java.util.Collection<Unit> units)
This occurs when a move has been undone


addAttackChange

public Change addAttackChange(Route route,
                              java.util.Collection<Unit> units)
Add a bunch of attacking units to the battle.


fight

public void fight(IDelegateBridge bridge)
Fight this battle.


isBombingRun

public boolean isBombingRun()
Return whether this battle is a bombing run.


unitsLostInPrecedingBattle

public void unitsLostInPrecedingBattle(games.strategy.triplea.delegate.Battle battle,
                                       java.util.Collection<Unit> units,
                                       IDelegateBridge bridge)
Call this method when units are lost in another battle. This is needed to remove dependent units who have been lost in another battle.


hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

getTerritory

public Territory getTerritory()
Return what territory this battle is occuring in.


getDependentUnits

public java.util.Collection<Unit> getDependentUnits(java.util.Collection<Unit> units)
Return units which are dependent on the given units.


addBombardingUnit

public void addBombardingUnit(Unit unit)
Add bombarding unit. Doesn't make sense here so just do nothing.


isAmphibious

public boolean isAmphibious()
Return whether battle is amphibious.


getAmphibiousLandAttackers

public java.util.Collection<Unit> getAmphibiousLandAttackers()
Return units which are actually assaulting amphibiously


getBombardingUnits

public java.util.Collection<Unit> getBombardingUnits()
Return units which are actually bombarding


getBattleRound

public int getBattleRound()