IFDEF that score expectation logging
authorunc0rr
Tue, 07 May 2013 23:37:03 +0400
changeset 8965 b4f10ff6ea90
parent 8964 962ede906da1
child 8966 5ab59d79bc9a
IFDEF that score expectation logging
hedgewars/uAI.pas
--- a/hedgewars/uAI.pas	Tue May 07 15:34:36 2013 -0400
+++ b/hedgewars/uAI.pas	Tue May 07 23:37:03 2013 +0400
@@ -486,7 +486,9 @@
 SDL_UnlockMutex(ThreadLock);
 end;
 
-//var scoreShown: boolean = false;
+{$IFDEF DEBUGAI}
+var scoreShown: boolean = false;
+{$ENDIF}
 
 procedure ProcessBot;
 const cStopThinkTime = 40;
@@ -508,17 +510,21 @@
                 if Gear^.Message <> 0 then
                     exit;
 
-                //scoreShown:= false;
+{$IFDEF DEBUGAI}
+                scoreShown:= false;
+{$ENDIF}
                 StartThink(Gear);
                 StartTicks:= GameTicks
 
             end else
                 begin
-                {if not scoreShown then
+{$IFDEF DEBUGAI}
+                if not scoreShown then
                     begin
                     if BestActions.Score > 0 then ParseCommand('/say Expected score = ' + inttostr(BestActions.Score div 1024), true);
                     scoreShown:= true
-                    end;}
+                    end;
+{$ENDIF}
                 ProcessAction(BestActions, Gear)
                 end
         else if ((GameTicks - StartTicks) > cMaxAIThinkTime)