hedgewars/uAI.pas
changeset 9003 896c6b21c87f
parent 8965 b4f10ff6ea90
child 9080 9b42757d7e71
equal deleted inserted replaced
9002:2e4cf893c060 9003:896c6b21c87f
   127             begin
   127             begin
   128 {$HINTS OFF}
   128 {$HINTS OFF}
   129             Score:= AmmoTests[a].proc(Me, Targets.ar[i], BotLevel, ap);
   129             Score:= AmmoTests[a].proc(Me, Targets.ar[i], BotLevel, ap);
   130 {$HINTS ON}
   130 {$HINTS ON}
   131             if Actions.Score + Score > BestActions.Score then
   131             if Actions.Score + Score > BestActions.Score then
   132                 if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel) * 2048) then
   132                 if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel - 1) * 2048) then
   133                     begin
   133                     begin
   134                     BestActions:= Actions;
   134                     BestActions:= Actions;
   135                     inc(BestActions.Score, Score);
   135                     inc(BestActions.Score, Score);
   136                     BestActions.isWalkingToABetterPlace:= false;
   136                     BestActions.isWalkingToABetterPlace:= false;
   137 
   137