Computer Chess Club Archives


Search

Terms

Messages

Subject: OT: Checkers programming

Author: Rick Bischoff

Date: 08:37:07 09/09/04


Hello all,

I am bored with my mediocre chess engine, so I decided to start a mediocre
checkers engine instead.  Anyway, I am scratching my head how to store the
moves.. I was thinking that a structure similar to:

struct Move {
int startIndex;
int n;
int array[8];
}

Where n is the number of elements in the array.. (i.e., a single move/capture
would have n = 1, a double jump would have n = 2 )

Where each array[i] would store the direction of the move (NW,NE,SW,SE) and two
bits to represent capture/no capture/king capture/X

However, I have a couple of questions regarding this format:

I do not know the longest sequence of captures possible-- i.e., is there a 9
step double jump possible?  a 12 step?  I mean, if it were only 8, I could just
use a single integer instead of an array.

Also, is there a better way to represent moves?



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.