Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Can u put a move_generator to small defs:

Author: Nicolas Carrasco

Date: 18:55:56 08/31/99

Go up one level in this thread


Thanks, do u use this type o move_generator data ?
        Is this data able to do a fast move_generator?

On August 31, 1999 at 19:54:31, James Robertson wrote:

I don't understand your movelist. Does this structure represent one move or a
whole list of moves?

I think the easiest way to represent moves is with a structure similar to:

struct move {
  char from;
  char to;
  char promote;   // promotion piece.
  char flags;     // castling, ep, etc.
};

To make things even simpler, make your move just an int, and have macros to
extract the different parts. (I think EXchess or TSCP (one of the two) does
something like this with unions).

Once you have a move, just make a simple array of moves:

move move_list[200];
int number_of_moves;

If you want a structure for your movelist, do something like:

struct move_list {
  int number_of_moves;
  move list[200];
};




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.