anchor.diff:        end;
       end;
   
  -    inc(i);
  -    H:=TKMHouseInn(FindHouse(ht_Inn,i));
  +    inc(I);
  +    H := TKMHouseInn(FindHouse(ht_Inn, I));
     until(H = nil);
   end;
   
  
positive.code: 
  { TKMPlayer }
  constructor TKMPlayer.Create(aPlayerIndex: TPlayerIndex);
  var i: integer;
  begin
    Inherited Create (aPlayerIndex);
    fAI           := TKMPlayerAI.Create(fPlayerIndex);
    fFogOfWar     := TKMFogOfWar.Create(fTerrain.MapX, fTerrain.MapY);
    fGoals        := TKMGoals.Create;
  
negative.code: function TKMPlayer.FindInn(Loc: TKMPoint; aUnit: TKMUnit; UnitIsAtHome: Boolean=false): TKMHouseInn;
  var
    H: TKMHouseInn;
    I: Integer;
    Dist, BestMatch: Single;
  begin
    //This function will return the best inn for a unit at Loc, base on distance, food available and space available.
    //Will return nil if no suitable inn is available
    Result := nil;
    I := 1;
    BestMatch := 9999;
    if UnitIsAtHome then inc(Loc.Y); //From outside the door of the house
  
    H := TKMHouseInn(FindHouse(ht_Inn));
    repeat
      //First make sure that it is valid
      if (H <> nil) and H.HasFood and H.HasSpace and fTerrain.Route_CanBeMade(Loc, KMPointBelow(H.GetEntrance), aUnit.GetDesiredPassability(True), 0, False) then
      begin
        //Take the closest inn out of the ones that are suitable
        Dist := GetLength(H.GetPosition, Loc);
        if Dist < BestMatch then
        begin
          Result := H;
  