Implement exclude-moves feature
[bonanza.git] / root.c
diff --git a/root.c b/root.c
index e778431..104c4f7 100644 (file)
--- a/root.c
+++ b/root.c
@@ -211,6 +211,13 @@ read_rest_list( tree_t * restrict ptree, unsigned int * restrict pmove_list )
   int iret, imove;
   char a[65536];
 
+  if ( analyze_mode ) { // [HGM] exclude: in analyze mode we use the interactively updated list in stead of the file
+    for ( imove = 0; imove < MAX_LEGAL_MOVES && exclude_list[imove]; imove++ )
+      pmove_list[imove] = exclude_list[imove];
+    pmove_list[imove] = 0;
+    return 0;
+  }
+
   pf = file_open( "restraint.dat", "r" );
   if ( pf == NULL ) { return -2; }