anchor.diff:      num offenseRoll = offense.rollForLuck();
       num defenseRoll = defense.rollForLuck();
       //critical/glancing hit odds.
  -    if(defenseRoll > offenseRoll*2){ //glancing blow.
  +    if (defenseRoll > offenseRoll * 2) { //glancing blow.
         //print("Glancing Hit: " + this.session.session_id);
  -      hit = hit/2;
  +      hit = hit / 2;
         div.append(" The attack manages to not hit anything too vital. ");
  -    }else if(offenseRoll > defenseRoll*2){
  +    } else if (offenseRoll > defenseRoll * 2) {
         //print("Critical hit.");
         ////print("Critical Hit: " + this.session.session_id);
  -      hit = hit*2;
  +      hit = hit * 2;
         div.append(" Ouch. That's gonna leave a mark. ");
  -    }else{
  +    } else {
         //print("a hit.");
         div.append(" A hit! ");
       }
   
   
  -    defense.currentHP += -1* hit;
  +    defense.currentHP += -1 * hit;
       //this.processDeaths(div, offense, defense);
     }
  +}
   
   //it is assumed that all members are on the same side and won't hurt each other.
   class Team implements Comparable{  //when you want to sort teams, you sort by mobility.
  
positive.code:   //denizen fights have special rules when it is 1 on 1, denizen vs player.
    //if can't find one, won't add it. so anything other than size 2 is invalid.
    List<GameEntity> findMembersOfDenizenFight() {
        Denizen d;
        Player p;
        List<GameEntity> ret = new List<GameEntity>();
        for(Team team in teams) {
          Denizen tmpd = team.findDenizen();
          Player  tmpp = team.findPlayer();
          if(d == null) {
            d = tmpd;
          }else {
            return ret; //i found TWO deniznes. Hax. I call hax.
          }
  
          if(p == null) {
            p = tmpp;
          }else {
            return ret; //i found TWO players. Hax. I call hax.
          }
        }
        if(d != null) ret.add(d);
        if(p != null) ret.add(p);
        return ret;
    }
  
    //a strife is over when only one team is capable of fighting anymore. livingMinusAbsconded == 0;
    Team strifeEnded() {
        Team t;
        for(Team team in teams) { //this is the Buffalo buffallo bufallo Buffalo bufallo of this sim.
            if(team.hasLivingMembersPresent()) {
              if(t != null){
                return null; //more than one team is still in the game.
              }else {
                t = team;
              }
            }
        }
        return t; //1 or fewer teams remain
    }
  
  
  
negative.code:   remains that GameEntities, Players and PlayerSnapshots are all treated as interchangeable
    and in Dart they are NOT.  So I need to do inheritance proper style.
   */
  class Strife {
    //TODO subclass strife for pvp but everybody lives strifes
    List<
        Team> teams; //for now, assume 2 teams, but could support more in future. think terezi +dave +dirk fighting two non-allied Jacks
    num turnsPassed = 0; //keep track for interuptions and etc.
    Session session;
  
    Strife(this.session, this.teams);
  
    num timeTillRocks = 99999999; //unless it's a royalty fight, assume no rocks.
  
    //TODO for now keeping old code as reference material, but delete it whole sale. it is too tangled up in "this" is a GameEntity.
  
    //TODO get this working, then rewrite code for each sub part.
    void startTurn(div) {
      teams
          .sort(); //we do this every turn because mobility can change and should effect turn order.
      for (Team team in teams) {
        team.takeTurn(
            div, turnsPassed, teams); //will handling resetting player availablity
      }
      checkForSuddenEnding(
          div); //everyone is killed. or absconded in denizen case. calls processEnding on own.
      Team winner = strifeEnded();
      if (winner != null) {
        describeEnding(div, winner); //will call processEnding.
      } else {
        turnsPassed ++;
        startTurn(div);
      }
    }
  
    void checkForSuddenEnding(div) {
      if (turnsPassed > timeTillRocks) {
        this.rocksFallEverybodyDies(div);
        processEnding();
      } else if (denizenDoneWithYourShit(
          div)) { //highest priority. Denizen will take care of ending their fights.
        processEnding();
      } else if (turnsPassed > 30) { //holy shit are you not finished yet???
        summonAuthor(div);
        processEnding();
      }
    }
  
    bool denizenDoneWithYourShit(div) {
      List<GameEntity> members = findMembersOfDenizenFight();
      Denizen d = members[0];
      Player p = members[1];
      if (members.length != 2) return false; //it's not a denizen fight.
      //okay, now i know it IS a denizen fight.
      if (turnsPassed > 5) return true; //you should have beaten me by now.
      if (p.godDestiny) return false; //eh, you'll be okay even if I kill you.
      if (p.getStat("currentHP") < d.getStat("power"))
        return true; //i can kill you in one hit.
      if (p.getStat("currentHP") < 2 * d.getStat("power") && seededRandom() > 0.5)
        return true; //i can kill you in two hits and am worried about a critical hit.
    }
  
  
  