Hey guys,
I have written a chess engine and found an article on internet about how to communicate with WinBoard. I have set up all the things.
My problem is how can I setup winboard to make it use my engine?
Thank you all!
Moderator: Andres Valverde
recognized 'normal' (-1) as variant normal
WinBoard 4.2.7 + ChessAITest.exe
Reset(1, 0) from gameMode 0
recognized 'normal' (-1) as variant normal
GameEnds(0, (null), 2)
StartChildProcess (dir="") ChessAITest.exe
610 >first : xboard
protover 2
Fatal Error: Error writing to first chess program:
Closing pipe.
Fatal Error: Error: first chess program (ChessAITest.exe) exited unexpectedly
GameEnds(0, (null), 2)
1641 >first : force
1641 >first : quit
setbuf(stdout, NULL);
setbuf(stdin, NULL);
char buf[80];
while(1) {
scanf("%s", buf);
printf("%s", buf);
fflush(stdout);
}
void ReadLine(char* buff)
{
int c = 0;
int cnt = 0;
while (c != '\n')
{
c = getch();
buff[cnt++] = (char)c;
}
buff[--cnt] = NULL;
}
void winBoardLoop()
{
setbuf(stdout, NULL);
setbuf(stdin, NULL);
char cmd[256];
memset(cmd, 0, 256);
while (true)
{
ReadLine(cmd);
if (!strcmp(cmd, "new"))
{
// and so on ...
scanf("%s\n", cmd);
Return to Winboard and related Topics
Users browsing this forum: No registered users and 12 guests