Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How do you represent chess boards in your chess programms

Author: Normand M. Blais

Date: 18:35:55 09/24/99

Go up one level in this thread


On September 24, 1999 at 17:37:41, Hristo wrote:

>Hi Normans.
>I've been using similar approach for some time now!
>It's *funny* to see how close our ideas are ...
>The diference is that I use direction[8][8]*64 matrix.
>and the directions are not predefined. There is a maximum
>of 8 directions and the maximum length a piece can go is 7
>squares. i.e. square(x).direction(1).vector(...) = square number
>includes all possible squares that a given piece
>can reach from a given square(x) in direction(1).
>vector(n) is the square number and it doesn't have to adjacent to the
>origin square.
>Use vector(n)=0 as terminator and then go to the next direction.
>If direction(n)=0 there are no more valid directions.
>Knight moves are considerd in the same way as everything else, just their
>vectors have only one entry ...
>Single, very simple function, is used to generate almost all moves ...
>the pawns are a bit tricky, but not too bad.
>
>
>regards.
>hristo

Thanks. I'll consider that.

NNB




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.