Author: Gerd Isenberg
Date: 00:12:23 08/27/05
Go up one level in this thread
On August 26, 2005 at 16:11:53, Dan Honeycutt wrote: >Run the lowest bits down the a or h file and you can do pawn captures without >having to mask those files. > >Best >Dan H. Hi Dan, a very nice idea! Keeping the a-file in least significant byte and the h-file in the most significant byte (or vice versa) to avoid a-h-wraps for pawn attacks and further ands. eg. with a1 == 0: a1 a2 a3 a4 a5 a6 a7 a8 b1 b2 b3 b4 b5 b6 b7 b8 c1 c2 c3 c4 c5 c6 c7 c8 d1 d2 d3 d4 d5 d6 d7 d8 e1 e2 e3 e4 e5 e6 e7 e8 f1 f2 f3 f4 f5 f6 f7 f8 g1 g2 g3 g4 g5 g6 g7 g8 h1 h2 h3 h4 h5 h6 h7 h8 "left" attacks of white pawns ::= white pawns >> 7 ; eg. e4:d5 "right" attacks of white pawns ::= white pawns << 9 ; eg. e4:f5 "left" attacks of black pawns ::= black pawns >> 9 ; eg. e4:d3 "right" attacks of black pawns ::= black pawns << 7 ; eg. e4:f3 Gerd
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.