anchor.diff:      for I := 0 to fForestsNearby.Count - 1 do
       begin
         Loc := fForestsNearby.Items[I];
  -//      Cnt := 0;
  -//      for K := 0 to fForestsNearby.Count-1 do // Check if we are above or under median
  -//        if (fForestsNearby.Tag2[I] > fForestsNearby.Tag2[K]) then
  -//          Cnt := Cnt + 1;
  -
         Color := (Max(50,Round((fForestsNearby.Tag[I] - fForestsNearby.Tag[0]) * Division)) shl 24) OR $000000FF;
         gRenderAux.Quad(Loc.X, Loc.Y, Color);
       end;
  
positive.code:         begin
            Loc := fPlannedHouses[HT].Plans[I].Loc;
            Dist := abs(Loc.X - aNewLoc.X) + abs(Loc.Y - aNewLoc.Y) * 1.5; // Prefer to connect road in X axis
            if (Dist < BestDist) then
            begin
              BestDist := Dist;
              aExistLoc := Loc;
  
negative.code: 
  
  
  { JUNK:
  
  
  function GetBlockingTrees(aHT: THouseType; aLoc: TKMPoint; var aTrees: TKMPointArray): Boolean;
  function GetBlockingFields(aHT: THouseType; aLoc: TKMPoint; var aFields: TKMPointArray): Boolean;
  
  function TKMCityPlanner.GetBlockingTrees(aHT: THouseType; aLoc: TKMPoint; var aTrees: TKMPointArray): Boolean;
  var
    Output: Boolean;
    I,X,Y, TreeCnt: Integer;
    HMA: THouseMappingArray;
  begin
    Result := True;
    if (aHT in [ht_IronMine, ht_GoldMine, ht_CoalMine]) then
      Exit;
  
    HMA := gAIFields.Eye.HousesMapping;
    SetLength(aTrees, Length(HMA[aHT].Tiles));
    for I := Low(aTrees) to High(aTrees) do
      aTrees[I] := KMPOINT_ZERO;
  
    Output := True;
    TreeCnt := 0;
    for I := Low(HMA[aHT].Tiles) to High(HMA[aHT].Tiles) do
    begin
      X := aLoc.X + HMA[aHT].Tiles[I].X;
      Y := aLoc.Y + HMA[aHT].Tiles[I].Y;
      Output := Output AND (tpBuild in gTerrain.Land[Y,X].Passability);
      if gTerrain.ObjectIsChopableTree(X, Y) then
      begin
        aTrees[TreeCnt] := KMPoint(X,Y);
        TreeCnt := TreeCnt + 1;
      end;
      if not Output then
        break;
    end;
    Result := Output;
  end;
  
  
  function TKMCityPlanner.GetBlockingFields(aHT: THouseType; aLoc: TKMPoint; var aFields: TKMPointArray): Boolean;
  var
    I,X,Y, FieldCnt: Integer;
    HMA: THouseMappingArray;
  begin
    Result := True;
    if (aHT in [ht_IronMine, ht_GoldMine, ht_CoalMine]) then
      Exit;
  
    HMA := gAIFields.Eye.HousesMapping;
    SetLength(aFields, Length(HMA[aHT].Tiles));
    for I := Low(aFields) to High(aFields) do
      aFields[I] := KMPOINT_ZERO;
  
    FieldCnt := 0;
    for I := Low(HMA[aHT].Tiles) to High(HMA[aHT].Tiles) do
    begin
      X := aLoc.X + HMA[aHT].Tiles[I].X;
      Y := aLoc.Y + HMA[aHT].Tiles[I].Y;
      aFields[FieldCnt] := KMPoint(X,Y);
      if     (gHands[fOwner].BuildList.FieldworksList.HasField(aFields[FieldCnt]) = ft_Wine)
          OR (gHands[fOwner].BuildList.FieldworksList.HasField(aFields[FieldCnt]) = ft_Corn) then
        FieldCnt := FieldCnt + 1;
    end;
    Result := (FieldCnt > 0);
  end;
  
  
  procedure TKMCityPlanner.PlanFarmFields(aLoc: TKMPoint; var aNodeTagList: TKMPointTagList);
  const
    NORTH_PENALIZATION = 10;
  