hedgewars/uAIMisc.pas
changeset 136 89970b70b076
parent 108 08f1fe6f21f8
child 183 57c2ef19f719
--- a/hedgewars/uAIMisc.pas	Sun Sep 03 14:34:08 2006 +0000
+++ b/hedgewars/uAIMisc.pas	Sun Sep 03 15:26:52 2006 +0000
@@ -59,6 +59,7 @@
 function RateExplosion(Me: PGear; x, y, r: integer): integer;
 function RateShove(Me: PGear; x, y, r, power: integer): integer;
 function HHGo(Gear, AltGear: PGear; out GoInfo: TGoInfo): boolean;
+function rndSign(num: integer): integer;
 
 var ThinkingHH: PGear;
     Targets: TTargets;
@@ -401,4 +402,10 @@
 HHJump(AltGear, jmpHJump, GoInfo)
 end;
 
+function rndSign(num: integer): integer;
+begin
+if random(2) = 0 then Result:=   num
+                 else Result:= - num
+end;
+
 end.