/[chess]/chess/src/cmd.c
ViewVC logotype

Diff of /chess/src/cmd.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.55 by srw, Thu Jun 19 17:28:47 2003 UTC revision 1.56 by srw, Mon Jun 30 11:00:02 2003 UTC
# Line 171  void cmd_book(void) Line 171  void cmd_book(void)
171  /* Our opponent is a computer */  /* Our opponent is a computer */
172  void cmd_computer(void) {}  void cmd_computer(void) {}
173    
 /*  
  * XXX - Debugging is more or less borked like that. (I think.)  
  * Have to figure out how this was meant to work.  
  */  
 void cmd_debug(void)  
 {  
   char *s1, *s2;  
   int i;  
   leaf *ptr;  
     
   SET (flags, DEBUGG);  
   Debugmvl = 0;  
   s1 = token[1];  
   while (*s1) {  
     for (s2 = s1+1; *s2 && !isspace(*s2); s2++) ;  
     *s2 = '\0';  
     ptr = ValidateMove (s1);  
     if (ptr) {  
       Debugmv[Debugmvl++] = ptr->move;  
       MakeMove (board.side, &ptr->move);  
     }  
     for (s1 = s2+1; isspace(*s1); s1++) ;  
   }  
   i = Debugmvl;  
   while (i)     {  
     UnmakeMove (board.side, &Debugmv[--i]);  
   }  
 }  
   
 void cmd_debugply(void) {  }  
   
 void cmd_debugdepth(void) {  }  
   
 void cmd_debugnode(void) { }  
   
174  void cmd_depth(void)  void cmd_depth(void)
175  {  {
176    SearchDepth = atoi (token[1]);    SearchDepth = atoi (token[1]);
# Line 922  const struct methodtable commands[] = { Line 887  const struct methodtable commands[] = {
887    { "black", cmd_black },    { "black", cmd_black },
888    { "book", cmd_book },    { "book", cmd_book },
889    { "computer", cmd_computer },    { "computer", cmd_computer },
   { "debug", cmd_debug },  
   { "debugdepth", cmd_debugdepth },  
   { "debugnode", cmd_debugnode },  
   { "debugply", cmd_debugply },  
890    { "depth", cmd_depth },    { "depth", cmd_depth },
891    { "draw", cmd_draw },    { "draw", cmd_draw },
892    { "easy", cmd_easy },    { "easy", cmd_easy },

Legend:
Removed from v.1.55  
changed lines
  Added in v.1.56

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26