public void prepForBattle(Battlefield bf) { this.bf = bf; targets = new List <BattleThreat>(); foreach (BattleTarget bt in bf.party) { BattleThreat newThreat = new BattleThreat(bt); targets.Add(newThreat); } }
public BattleThreat getHighestThreat() { BattleThreat highest = null; foreach (BattleThreat bt in targets) { if (highest == null) { highest = bt; } else if (highest != null) { if (bt.threat > highest.threat) { highest = bt; } } } return(highest); }