Author: Uri Blass
Date: 16:09:05 10/19/03
Go up one level in this thread
On October 19, 2003 at 18:38:15, Gopi wrote:
>I cant actually follow what its been done in this piece of code which is in
>Makemove function. if (m.bits&8) { if(side==LIGHT) ep=m.to+8;
>else ep=m.to-8;} So why is that m.bits is bitwise ANDed with 8? Actually for
>enpassement its 4 right? So please can anyone explain it.Thanks a lot.
m.bits&8 means that the pawn moves 2 squares
ep is saved for generating the en passant captures of the opponent and is
practically (m.from+m.to)/2 in both cases.
I think that writing ((m.from+m.to)>>1) is more simple and you do not need if
command.
Uri
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.