Author: Pat King
Date: 13:34:33 06/10/02
Go up one level in this thread
On June 09, 2002 at 19:27:33, Russell Reagan wrote: >So instead of having a switch statement with a case for each kind of piece, you >create classes for each piece and each piece object can generate it's own legal >moves? Correct. The high level calls simply loop over the piece lists. For that matter, the pieces inherit from white_piece and black_piece, which automatically maintain the piece lists. > >If this is correct, this might be an interesting way of handling check >extensions or threat extensions. > >Russell I've always handled extensions pretty conventionally. What are you thinking, that the move generators can set some flag if they find captures or checks? I did do some testing of "if" vs virtual method calls, and the method calls appeared faster (win95, mingw) Pat
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.