hedgewars/uAIMisc.pas
changeset 351 29bc9c36ad5f
parent 191 a03c2d037e24
child 369 2aed85310727
equal deleted inserted replaced
350:c3ccec3834e8 351:29bc9c36ad5f
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
    17  *)
    17  *)
    18 
    18 
    19 unit uAIMisc;
    19 unit uAIMisc;
    20 interface
    20 interface
    21 uses SDLh, uConsts, uGears;
    21 uses SDLh, uConsts, uGears, uFloat;
    22 {$INCLUDE options.inc}
    22 {$INCLUDE options.inc}
    23 
    23  {
    24 type TTarget = record
    24 type TTarget = record
    25                Point: TPoint;
    25                Point: TPoint;
    26                Score: integer;
    26                Score: integer;
    27                end;
    27                end;
    28      TTargets = record
    28      TTargets = record
    46 function HHGo(Gear, AltGear: PGear; out GoInfo: TGoInfo): boolean;
    46 function HHGo(Gear, AltGear: PGear; out GoInfo: TGoInfo): boolean;
    47 function rndSign(num: integer): integer;
    47 function rndSign(num: integer): integer;
    48 
    48 
    49 var ThinkingHH: PGear;
    49 var ThinkingHH: PGear;
    50     Targets: TTargets;
    50     Targets: TTargets;
    51 
    51                        }
    52 implementation
    52 implementation
    53 uses uTeams, uMisc, uLand, uCollisions;
    53 {uses uTeams, uMisc, uLand, uCollisions;
    54 const KillScore = 200;
    54 const KillScore = 200;
    55       MAXBONUS = 1024;
    55       MAXBONUS = 1024;
    56       
    56       
    57 type TBonus = record
    57 type TBonus = record
    58               X, Y: integer;
    58               X, Y: integer;
   387 
   387 
   388 function rndSign(num: integer): integer;
   388 function rndSign(num: integer): integer;
   389 begin
   389 begin
   390 if random(2) = 0 then Result:=   num
   390 if random(2) = 0 then Result:=   num
   391                  else Result:= - num
   391                  else Result:= - num
   392 end;
   392 end;  }
   393 
   393 
   394 end.
   394 end.