equal
deleted
inserted
replaced
433 BeginThread(@Think, Me, ThinkThread); |
433 BeginThread(@Think, Me, ThinkThread); |
434 {$ENDIF} |
434 {$ENDIF} |
435 AddFileLog('Thread started'); |
435 AddFileLog('Thread started'); |
436 end; |
436 end; |
437 |
437 |
438 var scoreShown: boolean = false; |
438 //var scoreShown: boolean = false; |
439 |
439 |
440 procedure ProcessBot; |
440 procedure ProcessBot; |
441 const cStopThinkTime = 40; |
441 const cStopThinkTime = 40; |
442 begin |
442 begin |
443 with CurrentHedgehog^ do |
443 with CurrentHedgehog^ do |
455 end; |
455 end; |
456 |
456 |
457 if Gear^.Message <> 0 then |
457 if Gear^.Message <> 0 then |
458 exit; |
458 exit; |
459 |
459 |
460 scoreShown:= false; |
460 //scoreShown:= false; |
461 StartThink(Gear); |
461 StartThink(Gear); |
462 StartTicks:= GameTicks |
462 StartTicks:= GameTicks |
463 |
463 |
464 end else |
464 end else |
465 begin |
465 begin |
|
466 (* |
466 if not scoreShown then |
467 if not scoreShown then |
467 begin |
468 begin |
468 if BestActions.Score > 0 then ParseCommand('/say Expected score = ' + inttostr(BestActions.Score div 1024), true); |
469 if BestActions.Score > 0 then ParseCommand('/say Expected score = ' + inttostr(BestActions.Score div 1024), true); |
469 scoreShown:= true |
470 scoreShown:= true |
470 end; |
471 end;*) |
471 ProcessAction(BestActions, Gear) |
472 ProcessAction(BestActions, Gear) |
472 end |
473 end |
473 else if ((GameTicks - StartTicks) > cMaxAIThinkTime) |
474 else if ((GameTicks - StartTicks) > cMaxAIThinkTime) |
474 or (TurnTimeLeft <= cStopThinkTime) then |
475 or (TurnTimeLeft <= cStopThinkTime) then |
475 StopThinking:= true |
476 StopThinking:= true |