hedgewars/uAIAmmoTests.pas
changeset 7501 1763dc3bc9b7
parent 7486 f3a13da9fa4e
child 7620 fa3bc79dc0b8
equal deleted inserted replaced
7498:86984f6fa1b9 7501:1763dc3bc9b7
  1094 function TestCake(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt;
  1094 function TestCake(Me: PGear; Targ: TPoint; Level: LongInt; var ap: TAttackParams): LongInt;
  1095 var valueResult, v1, v2: LongInt;
  1095 var valueResult, v1, v2: LongInt;
  1096     x, y, trackFall: LongInt;
  1096     x, y, trackFall: LongInt;
  1097     cake: TGear;
  1097     cake: TGear;
  1098 begin
  1098 begin
  1099     Level:= Level; // avoid compiler hint
  1099     if (Level > 2) then
       
  1100         exit(BadTurn);
  1100     ap.ExplR:= 0;
  1101     ap.ExplR:= 0;
  1101     ap.Time:= 0;
  1102     ap.Time:= 0;
  1102     ap.Power:= BadTurn; // use it as max score value in checkCakeWalk
  1103     ap.Power:= BadTurn; // use it as max score value in checkCakeWalk
  1103 
  1104 
  1104     FillChar(cake, sizeof(cake), 0);
  1105     FillChar(cake, sizeof(cake), 0);