@Test public void testGetDamageGiven() { GunDataManager gdm = newGunDataManager(); GunEnemy shadowData = gdm.newEnemy(_shadowSre, _enemyLocation, 0, 1, false); GunEnemy phoenixData = gdm.newEnemy(_phoenixSre, _enemyLocation, 0, 1, false); GunEnemy portiaData = gdm.newEnemy(_portiaSre, _enemyLocation, 0, 1, false); shadowData.damageGiven = 0; phoenixData.damageGiven = 10; portiaData.damageGiven = 25.5; assertEquals(35.5, gdm.getDamageGiven(), 0.01); }
public double getDamageGiven() { double damageGiven = 0; for (GunEnemy gunData : getAllEnemyData()) { damageGiven += gunData.damageGiven; } return damageGiven; }
GunDataManager extends EnemyDataManager<GunEnemy> { public double getDamageGiven() { double damageGiven = 0; for (GunEnemy gunData : getAllEnemyData()) { damageGiven += gunData.damageGiven; } return damageGiven; } }
GunDataManager extends EnemyDataManager<GunEnemy> { public double getDamageGiven() { double damageGiven = 0; for (GunEnemy gunData : getAllEnemyData()) { damageGiven += gunData.damageGiven; } return damageGiven; } GunDataManager(int enemiesTotal, BattleField battleField,
      MovementPredictor predictor, Collection<RoboGraphic> renderables,
      OutputStream out); }
GunDataManager extends EnemyDataManager<GunEnemy> { public double getDamageGiven() { double damageGiven = 0; for (GunEnemy gunData : getAllEnemyData()) { damageGiven += gunData.damageGiven; } return damageGiven; } GunDataManager(int enemiesTotal, BattleField battleField,
      MovementPredictor predictor, Collection<RoboGraphic> renderables,
      OutputStream out); @Override void initRound(); void execute(int currentRound, long currentTime, double bulletPower,
      double currentGunHeat, Point2D.Double myLocation, boolean is1v1,
      boolean painting); GunEnemy newEnemy(ScannedRobotEvent e, Point2D.Double enemyLocation,
      double absBearing, int currentRound, boolean is1v1); GunEnemy updateEnemy(ScannedRobotEvent e, Point2D.Double enemyLocation,
      double absBearing, int currentRound, boolean is1v1); void onBulletHit(BulletHitEvent e, long currentTime); void onBulletHitBullet(BulletHitBulletEvent e, long currentTime); double getDamageGiven(); double getAverageEnergy(); void markFiringWaves(long currentTime, boolean is1v1); void fireNextTickWave(Point2D.Double myNextLocation,
      Point2D.Double targetLocation, String targetName, int currentRound,
      long currentTime, double bulletPower, double myEnergy, double gunHeat,
      double myHeading, double myVelocity, int enemiesAlive); void addListener(GunDataListener listener); int getEnemiesTotal(); int getDuelDataSize(); void drawVictory(long startTime); }
GunDataManager extends EnemyDataManager<GunEnemy> { public double getDamageGiven() { double damageGiven = 0; for (GunEnemy gunData : getAllEnemyData()) { damageGiven += gunData.damageGiven; } return damageGiven; } GunDataManager(int enemiesTotal, BattleField battleField,
      MovementPredictor predictor, Collection<RoboGraphic> renderables,
      OutputStream out); @Override void initRound(); void execute(int currentRound, long currentTime, double bulletPower,
      double currentGunHeat, Point2D.Double myLocation, boolean is1v1,
      boolean painting); GunEnemy newEnemy(ScannedRobotEvent e, Point2D.Double enemyLocation,
      double absBearing, int currentRound, boolean is1v1); GunEnemy updateEnemy(ScannedRobotEvent e, Point2D.Double enemyLocation,
      double absBearing, int currentRound, boolean is1v1); void onBulletHit(BulletHitEvent e, long currentTime); void onBulletHitBullet(BulletHitBulletEvent e, long currentTime); double getDamageGiven(); double getAverageEnergy(); void markFiringWaves(long currentTime, boolean is1v1); void fireNextTickWave(Point2D.Double myNextLocation,
      Point2D.Double targetLocation, String targetName, int currentRound,
      long currentTime, double bulletPower, double myEnergy, double gunHeat,
      double myHeading, double myVelocity, int enemiesAlive); void addListener(GunDataListener listener); int getEnemiesTotal(); int getDuelDataSize(); void drawVictory(long startTime);  }