Author: Dann Corbit
Date: 20:36:23 06/17/02
Go up one level in this thread
On June 17, 2002 at 23:31:20, Adriano Bedeschi de Souza wrote:
>>while (p = Get_Next_Piece(bitboard))
>>{
>> Rotate45...
>> Remove_Piece(bitboard, p);
>>}
>
>Hmmm, look at my ChessPosition structure
>
>typedef struct _ChessPosition {
>
> char board[64];
>
> BitBoard whitePawns;
> BitBoard blackPawns;
>
> BitBoard whiteKnights;
> BitBoard blackKnights;
>
> BitBoard whiteBishops;
> BitBoard blackBishops;
>
> BitBoard whiteRooks;
> BitBoard blackRooks;
>
> BitBoard whiteQueens;
> BitBoard blackQueens;
>
> BitBoard whiteKing;
> BitBoard blackKing;
>
> BitBoard whitePieces;
> BitBoard blackPieces;
>
> int wKing;
> int bKing;
>
> int castle;
> int enpassant;
> int nMoves;
>
>} ChessPosition;
>
>if i put three more BitBoards in the structure (rotated90R, rotated45L,
>rotated45R) and i update it when calling makemove, why will i need to Rotate the
>board again? the Rotate45Right function turns into trash...
Might be handy for an input position:
setboard r6r/ppp1bQpp/2k1B1q1/4P3/4p3/2P1B3/PP3P1P/2K2R2 w - -
But you would not need it for that either. But since such a function (reading a
board position and converting to internal format) does not need to be fast and
it is conceptually easy to rotate it once you have it built, it might still be
handy to have around.
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.