hedgewars/uAI.pas
changeset 4374 bcefeeabaa33
parent 4373 fe0e3903bb9e
child 4377 43945842da0c
--- a/hedgewars/uAI.pas	Thu Nov 18 09:12:27 2010 +0300
+++ b/hedgewars/uAI.pas	Thu Nov 18 11:32:47 2010 +0300
@@ -31,7 +31,7 @@
 implementation
 uses uConsts, SDLh, uAIMisc, uAIAmmoTests, uAIActions, uMisc,
      uAmmos, SysUtils{$IFDEF UNIX}, cthreads{$ENDIF}, uTypes,
-     uVariables, uCommands;
+     uVariables, uCommands, uUtils;
 
 var BestActions: TActions;
     CanUseAmmo: array [TAmmoType] of boolean;
@@ -201,12 +201,12 @@
 Push(0, Actions, Me^, tmp);
 Push(0, Actions, Me^, tmp xor 3);
 
-if (Me^.State and gstAttacked) = 0 then maxticks:= max(0, TurnTimeLeft - 5000 - LongWord(4000 * BotLevel))
+if (Me^.State and gstAttacked) = 0 then maxticks:= Max(0, TurnTimeLeft - 5000 - LongWord(4000 * BotLevel))
                                    else maxticks:= TurnTimeLeft;
 
 if (Me^.State and gstAttacked) = 0 then TestAmmos(Actions, Me, false);
 BestRate:= RatePlace(Me);
-BaseRate:= max(BestRate, 0);
+BaseRate:= Max(BestRate, 0);
 
 while (Stack.Count > 0) and (not StopThinking) and (GameFlags and gfArtillery = 0) do
     begin