Changeset 522 for trunk/AI/StdAI/AI.pas


Ignore:
Timestamp:
Jan 7, 2024, 10:24:51 PM (4 months ago)
Author:
chronos
Message:
  • Modified: Code cleanup.
  • Added: High DPI aware SetWindowPos function.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AI/StdAI/AI.pas

    r486 r522  
    624624        begin
    625625          Inc(I);
    626           if random(I) = 0 then
     626          if Random(I) = 0 then
    627627            Result := ad;
    628628        end;
     
    11881188  begin
    11891189    if (Data.LastResearchTech = adHorsebackRiding) and (RO.ResearchTech < 0) and
    1190       (random(6) = 0) and (HavePort or (ContinentPresence[0] and not
     1190      (Random(6) = 0) and (HavePort or (ContinentPresence[0] and not
    11911191      (1 shl Me or PresenceUnknown) <> 0)) then
    11921192    begin
     
    21092109                begin
    21102110                  Inc(BestCount);
    2111                   if random(BestCount) = 0 then
     2111                  if Random(BestCount) = 0 then
    21122112                  begin
    21132113                    AttackScore := TestScore;
     
    22502250          begin
    22512251            Inc(BestCount);
    2252             if random(BestCount) = 0 then
     2252            if Random(BestCount) = 0 then
    22532253            begin
    22542254              PatrolScore := TestScore;
     
    24062406      begin
    24072407        Inc(Count);
    2408         if random(Count) = 0 then
     2408        if Random(Count) = 0 then
    24092409          Result := mix;
    24102410      end;
Note: See TracChangeset for help on using the changeset viewer.