public void destroyUnit() {
   health = 0;
   shields = 0;
   zombieInfectedTurns = 0;
   viperInfectedTurns = 0;
   animations.put(DEATH_EXPLOSION, createDeathExplosionAnim(false));
   animations.remove(ENERGON_TRANSFER);
 }
  public void updateRound() {
    ListIterator<Action> actionIterator = actions.listIterator();
    while (actionIterator.hasNext()) {
      Action a = actionIterator.next();
      if (currentRound >= (a.roundStarted + a.length)) {
        actionIterator.remove();
      }
    }

    aliveRounds += 1;

    updateDrawLoc();

    broadcast = (broadcast << 1) & 0x000FFFFF;
    if (regen > 0) regen--;

    Iterator<Map.Entry<Animation.AnimationType, Animation>> it = animations.entrySet().iterator();
    Map.Entry<Animation.AnimationType, Animation> entry;
    while (it.hasNext()) {
      entry = it.next();
      entry.getValue().updateRound();
      if (!entry.getValue().isAlive()) {
        if (entry.getKey() != DEATH_EXPLOSION) it.remove();
      }
    }
    currentRound++;
  }
 public boolean isAlive() {
   Animation deathAnim = animations.get(Animation.AnimationType.DEATH_EXPLOSION);
   return deathAnim == null || deathAnim.isAlive();
 }