Computer Chess Club Archives


Search

Terms

Messages

Subject: Generating Bitboard attack list

Author: Gopikrishna

Date: 06:23:10 06/06/04


In the following code,

piecebd=WhiteQueens;
      while (piecebd) {
      from=LastOne(piecebd);
      moves=AttacksQueen(from);
      temp=from+(queen<<12);
      while (moves) {
        to=LastOne(moves);
        move_list[i++]=temp+to<<6;
        Clear(to,moves);
      }
      Clear(from,piecebd);
    }

We are generating moves that queen attacks from the "from" square.But later we
are calculating some temp and then later adding it with "to" to create move
list.Why are we doing this? Also I dont follow why we are doing queen<<12 and
to<<6.The code is in http://www.cis.uab.edu/info/faculty/hyatt/bitmaps.html
Thanks.




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.