@Test public void testMarkFiringWaves() { GunEnemy shadowData = mock(GunEnemy.class); shadowData.alive = true; GunEnemy phoenixData = mock(GunEnemy.class); phoenixData.alive = true; GunEnemy portiaData = mock(GunEnemy.class); portiaData.alive = true; GunDataManager gdm = newGunDataManager(3); gdm.saveEnemy("Shadow", shadowData); gdm.saveEnemy("Phoenix", phoenixData); gdm.saveEnemy("Portia", portiaData); GunDataListener listener = mock(GunDataListener.class); gdm.addListener(listener); gdm.markFiringWaves(1, false); verify(shadowData).markFiringWaves(1, false, Arrays.asList(listener)); verify(phoenixData).markFiringWaves(1, false, Arrays.asList(listener)); verify(portiaData).markFiringWaves(1, false, Arrays.asList(listener)); }
public void markFiringWaves(long currentTime, boolean is1v1) { _lastBulletFiredTime = currentTime; for (GunEnemy gunData : getAllEnemyData()) { gunData.markFiringWaves(currentTime, is1v1, _listeners); } }
GunDataManager extends EnemyDataManager<GunEnemy> { public void markFiringWaves(long currentTime, boolean is1v1) { _lastBulletFiredTime = currentTime; for (GunEnemy gunData : getAllEnemyData()) { gunData.markFiringWaves(currentTime, is1v1, _listeners); } } }
GunDataManager extends EnemyDataManager<GunEnemy> { public void markFiringWaves(long currentTime, boolean is1v1) { _lastBulletFiredTime = currentTime; for (GunEnemy gunData : getAllEnemyData()) { gunData.markFiringWaves(currentTime, is1v1, _listeners); } } GunDataManager(int enemiesTotal, BattleField battleField,
      MovementPredictor predictor, Collection<RoboGraphic> renderables,
      OutputStream out); }
GunDataManager extends EnemyDataManager<GunEnemy> { public void markFiringWaves(long currentTime, boolean is1v1) { _lastBulletFiredTime = currentTime; for (GunEnemy gunData : getAllEnemyData()) { gunData.markFiringWaves(currentTime, is1v1, _listeners); } } 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 void markFiringWaves(long currentTime, boolean is1v1) { _lastBulletFiredTime = currentTime; for (GunEnemy gunData : getAllEnemyData()) { gunData.markFiringWaves(currentTime, is1v1, _listeners); } } 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);  }