Computer Chess Club Archives


Search

Terms

Messages

Subject: A question about crafty chess.h

Author: Uri Blass

Date: 05:25:06 01/08/03


1)I think to define bitboard for pawn structure so I looked at crafty code to
see how to define bitboard(My first try typedef unsigned__int64 Bitboard) did
not work and only after looking at crafty code(chess.h) I found that I forgot a
space between the unsigned and the __)

2)chess.h in crafty has the following code

#if defined(HAS_64BITS)
  typedef unsigned long BITBOARD;
#else
#  if defined(NT_i386) || defined(NT_AXP)
    typedef unsigned __int64 BITBOARD;
#  else
    typedef unsigned long long BITBOARD;
#  endif
#endif

Do I need all this #if's and in which machines my code is not supposed to work
if I avoid them and simply defined bitboard as unsigned__int64
Noe the problem is to understand chess.h that is a basic file.

3)My opinion that it may be good if there will be some advice to the reader in
main.c to read chess.h(I did not look at the latest crafty source code but the
problem for a beginner is where to start to read and there is no advice to start
reading in chess.h

4)The code that I downloaded crafty18.12(I guess no difference in latest crafty)
begins with the words

#if !defined(TYPES_INCLUDED)

I think that a comment that tell the reader in what system it is defined may be
productive.

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.