anchor.diff:    end;
     TKMDefencePosArr = array of TKMDefencePosition;
   
  -
  -  TBackwardFF = class(TNavMeshFloodFill)
  -  private
  -  protected
  -    fDefLinesRequired: Boolean;
  -    fOwner: TKMHandIndex;
  -    fBestEvaluation: Single;
  -    fDefInfo: TDefInfoArray;
  -
  -    function CanBeExpanded(const aIdx: Word): Boolean; override;
  -    procedure BackwardFlood();
  -    procedure EvaluateDefence(const aIdx: Word);
  -    function FindDefencePos(var aBaseCnt, aFirstLine: Word; aMinDefeces: Boolean): Boolean;
  -  public
  -    //D_INIT_ARR, D_INIT_FLOOD: TKMWordArray;
  -    BestDefLines: TKMDefenceLines;
  -    DefPosArr: TKMDefencePosArr;
  -
  -    procedure UpdatePointers(var aDefInfo: TDefInfoArray; var aQueueArray: TPolygonsQueueArr);
  -    procedure NewQueue(aVisitedIdx: Byte);
  -    procedure AddPolygon(aIdx: Word);
  -    function FindDefenceLines(aOwner: TKMHandIndex): TKMDefenceLines;
  -    function FindDefensivePolygons(aOwner: TKMHandIndex; var aBaseCnt, aFirstLine: Word; var aBestDefLines: TKMDefenceLines; aMinDefeces: Boolean; aDefLinesRequired: Boolean): TKMDefencePosArr;
  -
  -    //procedure DEBUG();
  -  end;
  +  TForwardFF = class;
  +  TBackwardFF = class;
  +  TFilterFF = class;
   
     TForwardFF = class(TNavMeshFloodFill)
     private
  
positive.code:       begin
          fQueueArray[NearbyIdx].Visited := fVisitedIdx; // Mark as visited
          fDefInfo[NearbyIdx].Distance := fQueueArray[NearbyIdx].Distance; // Save distance for future calculation
          if (PolyArr[NearbyIdx].NearbyCount = 3) then
          begin
            fQueueArray[NearbyIdx].Distance := High(Word) - fQueueArray[NearbyIdx].Distance; // Invert distance (only polygons which will be inserted)
            InsertAndSort(NearbyIdx); // Insert ONLY polygons with 3 nearby polygons because it is possible to create defence line from them and also it save performance
  
negative.code: begin
    // Get owner influence and distance from influence
    fDefInfo[aIdx].Influence := gAIFields.Influences.OwnPoly[fOwner, aIdx];
    fDefInfo[aIdx].AllyInfluence := gAIFields.Influences.GetBestAllianceOwnership(fOwner, aIdx, at_Ally);
    Distance := aDistance;
    if (fDefInfo[aIdx].Influence > OWNER_INFLUENCE_LIMIT) OR (fDefInfo[aIdx].AllyInfluence > OWNER_INFLUENCE_LIMIT) then
      Distance := 0;
    inherited MarkAsVisited(aIdx, Distance, aPoint);
    // For special polygons calculate also ene influence
    if (gAIFields.NavMesh.Polygons[aIdx].NearbyCount = 3) then
      fDefInfo[aIdx].EnemyInfluence := gAIFields.Influences.GetBestAllianceOwnership(fOwner, aIdx, at_Enemy);
  end;
  
  
  