anchor.diff:    function GetKaMSeed: Integer;
     function KaMRandomWSeed(var aSeed: Integer): Extended; overload;
     function KaMRandomWSeed(var aSeed: Integer; aMax: Integer): Integer; overload;
  -  function KaMRandom(const aCaller: String; aLogRng: Boolean = True): Extended; overload;
  -  function KaMRandom(aMax: Integer; const aCaller: String; aLogRng: Boolean = True): Integer; overload;
  -  function KaMRandomS1(aMax: Single; const aCaller: String): Single;
  -  function KaMRandomS2(Range_Both_Directions: Integer; const aCaller: String): Integer; overload;
  -  function KaMRandomS2(Range_Both_Directions: Single; const aCaller: String): Single; overload;
  +  function KaMRandom(const aCaller: AnsiString; aLogRng: Boolean = True): Extended; overload;
  +  function KaMRandom(aMax: Integer; const aCaller: AnsiString; aLogRng: Boolean = True): Integer; overload;
  +  function KaMRandomS1(aMax: Single; const aCaller: AnsiString): Single;
  +  function KaMRandomS2(Range_Both_Directions: Integer; const aCaller: AnsiString): Integer; overload;
  +  function KaMRandomS2(Range_Both_Directions: Single; const aCaller: AnsiString): Single; overload;
   
     function IsGameStartAllowed(aGameStartMode: TKMGameStartMode): Boolean;
     function GetGameVersionNum(const aGameVersionStr: AnsiString): Integer; overload;
  
positive.code: end;
  
  
  procedure DoLogKamRandom(aValue: Extended; aCaller: String; aKaMRandomFunc: String); overload;
  begin
    if ((gLog <> nil) and gLog.CanLogRandomChecks()) then
      gLog.LogRandomChecks(Format('%12s: %30s Caller: %s', [aKaMRandomFunc, FormatFloat('0.##############################', aValue), aCaller]));
  end;
  
  
  procedure LogKamRandom(aValue: Single; aCaller: String; aKaMRandomFunc: String); overload;
  begin
    DoLogKamRandom(aValue, aCaller, aKaMRandomFunc);
  
    {$IFDEF WDC}
    if SAVE_RANDOM_CHECKS and (gRandomCheckLogger <> nil) then
      gRandomCheckLogger.AddToLog(AnsiString(aCaller), aValue);
    {$ENDIF}
  end;
  
  
  procedure LogKamRandom(aValue: Extended; aCaller: String; aKaMRandomFunc: String); overload;
  begin
    DoLogKamRandom(aValue, aCaller, aKaMRandomFunc);
  
    {$IFDEF WDC}
    if SAVE_RANDOM_CHECKS and (gRandomCheckLogger <> nil) then
      gRandomCheckLogger.AddToLog(AnsiString(aCaller), aValue);
    {$ENDIF}
  end;
  
  
  procedure LogKamRandom(aValue: Integer; aCaller: String; aKaMRandomFunc: String); overload;
  begin
    DoLogKamRandom(aValue, aCaller, aKaMRandomFunc);
  
    {$IFDEF WDC}
    if SAVE_RANDOM_CHECKS and (gRandomCheckLogger <> nil) then
      gRandomCheckLogger.AddToLog(AnsiString(aCaller), aValue);
    {$ENDIF}
  end;
  
  
negative.code: 
  
  //Returns random number from -Range_Both_Directions to +Range_Both_Directions
  function KaMRandomS2(Range_Both_Directions: Integer; const aCaller: AnsiString): Integer;
  begin
    Result := KaMRandom(Range_Both_Directions*2+1, aCaller, False) - Range_Both_Directions;
  
    LogKamRandom(Result, aCaller, 'S2I*');
  end;
  
  
  //Returns random number from -Range_Both_Directions to +Range_Both_Directions
  function KaMRandomS2(Range_Both_Directions: Single; const aCaller: AnsiString): Single;
  begin
    Result := KaMRandom(Round(Range_Both_Directions*20000)+1, aCaller, False)/10000-Range_Both_Directions;
  
    LogKamRandom(Result, aCaller, 'S2S*');
  end;
  
  
  //Returns random number from 0 to +aMax
  function KaMRandomS1(aMax: Single; const aCaller: AnsiString): Single;
  begin
    Result := KaMRandom(Round(aMax*10000), aCaller, False)/10000;
  
    LogKamRandom(Result, aCaller, 'S1S*');
  end;
  