bug-gnu-chess
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: I made gnuchess freak out


From: Simon Waters
Subject: Re: I made gnuchess freak out
Date: Sat, 02 Mar 2002 13:39:18 +0000

Tim Mann wrote:
> 
> xboard doesn't check move legality in all cases.  The engine is
> supposed to report an "Illegal move" error on illegal moves (see the
> protocol spec for details), but GNU Chess 5 tends to just ignore any
> input it doesn't understand, including illegal moves.

Thanks Tim,

the CVS version of GNU Chess now spews "Illegal move:
<inputstring>" to anything it doesn't understand. The cheap and
cheerful 2 line change.

This can, and will make this reply to unimplemented commands ;(

This gets me an "Illegal move: <inputstring> (fcp rejected this
move)" or some such for the problematic en passant captures.

> If it's painful to tell the difference between "illegal move" and
> "unimplemented command that we want to ignore without bothering to
> write code to recognize it", you could set feature usermove=1.  Then
> (if talking to a GUI that implements protocol version 2), moves from
> the user will look like "usermove e2e4" instead of just "e2e4".  That
> should make it easier to generate an error message when the move is
> illegal, since you always know whether it's meant to be a move or not.

Hmm, I'll probably add this as well before 5.04 is released. Do
you know off hand what version of xboard this was introduced at,
as presumably I might be breaking support for earlier versions
of xboard/winboard.

> Alternatively, you could make sure that all the standard commands in
> the protocol are recognized (even if GNU Chess does nothing with some
> of them) and print a proper error message for all unrecognized commands.

But then it might be broken by future versions of the protocol,
unless you ignore "Illegal move: newcommandname" in which case I
probably don't need to worry about recognising all the commands
anyway.

I think we already catch most of the commands :), even if they
aren't implemented :(

 Simon
-- 
Free Software: What good is Open Source without Freedom?
Open Source Day 2002/04/27 Exeter University
Entry is free (as in free beer, but there isn't any free beer)
http://www.dclug.org.uk/ossday/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]