Author: Steffen Jakob
Date: 08:57:25 08/22/02
Go up one level in this thread
On August 22, 2002 at 11:32:32, Daniel Clausen wrote: >Hmm, the lines > registerCommand("quit", ENG_quit(), "Quits the program"); > >should of course be > registerCommand("quit", ENG_quit, "Quits the program"); > >"quit" > is the name of the command read from the input channel (can be a file, > stdin, a socket-connection from Finland (even from the US! Hi Matthew! :)) > >ENG_quit > a pointer to the function doing the work (like a call-back function) > >"Quits the program" > The description string of the command, which automatically appears > when you type 'help' in my engine. > >Sargon Cool! ;-) Here is how it looks in my code (unfortunately "register" is a keyword in C++): reg(new Command("board", "show the current board position", SEARCH, PUBLIC, &Engine::cmd_board)); reg(new Command("setboard", "set the board from a position in FEN notation", SEARCH, PUBLIC, &Engine::cmd_setboard)); BTW: here you see that I allow "setboard" during the search. I dont like it to have my available commands and e.g. their help text being separated in my code like e.g. crafty does. I am sure this would run out of sync very soon. Greetings, Steffen.
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.