Author: Tom Kerrigan
Date: 10:42:46 12/16/99
Go up one level in this thread
On December 16, 1999 at 13:19:04, Albert Silver wrote: >That's true but I would have imagined it would be relatively easy to program. As >a player I basically treat it as two possibilities: >- The pawn is forward two squares. >- The pawn moved one square and I captured it. >Is programming it any different? It depends on what you consider "easy." You have to keep track of each move where a pawn moves two squares, and which square it moved over. Then you have to check to see if a pawn is attacking that square, because the normal pawn capture code doesn't work because there's not a piece on that square. Then you have to have special code in makemove() to capture the pawn that moved two squares. And more special code in takeback() to put the captured pawn back. So it's not trivial... -Tom
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.