hedgewars/uAI.pas
changeset 5388 73ef8e437231
parent 5163 1620a02d5282
child 5394 924584407e01
child 5399 cdef954f8aec
equal deleted inserted replaced
5386:ba85acff9828 5388:73ef8e437231
    84            if Actions.Score + Score > BestActions.Score then
    84            if Actions.Score + Score > BestActions.Score then
    85             if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel) * 2048) then
    85             if (BestActions.Score < 0) or (Actions.Score + Score > BestActions.Score + Byte(BotLevel) * 2048) then
    86               begin
    86               begin
    87               BestActions:= Actions;
    87               BestActions:= Actions;
    88               inc(BestActions.Score, Score);
    88               inc(BestActions.Score, Score);
    89          addfilelog('AI: curr score ' + inttostr(bestactions.score));
       
    90 
    89 
    91               if (ap.Angle > 0) then AddAction(BestActions, aia_LookRight, 0, 200, 0, 0)
    90               if (ap.Angle > 0) then AddAction(BestActions, aia_LookRight, 0, 200, 0, 0)
    92               else if (ap.Angle < 0) then AddAction(BestActions, aia_LookLeft, 0, 200, 0, 0);
    91               else if (ap.Angle < 0) then AddAction(BestActions, aia_LookLeft, 0, 200, 0, 0);
    93 
    92 
    94               AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0);
    93               AddAction(BestActions, aia_Weapon, Longword(a), 300 + random(400), 0, 0);