hedgewars/uAIAmmoTests.pas
changeset 7525 5c840e221993
parent 7501 1763dc3bc9b7
child 7620 fa3bc79dc0b8
equal deleted inserted replaced
7507:3032a5739fe1 7525:5c840e221993
  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);