Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: 16x16 boards. Can anyone explain?

Author: Russell Reagan

Date: 01:48:49 06/20/02

Go up one level in this thread


As far as I know, this is how the 16x16 board is layed out:

XXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX
XXXXOOOOOOOOXXXX
XXXXOOOOOOOOXXXX
XXXXOOOOOOOOXXXX
XXXXOOOOOOOOXXXX
XXXXOOOOOOOOXXXX
XXXXOOOOOOOOXXXX
XXXXOOOOOOOOXXXX
XXXXOOOOOOOOXXXX
XXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXX

The O's are the board, and the X's are the illegal squares. I don't know how
this differs much from a 12x12, or a 12x10 board, but if Christophe says so,
then I have no reason to believe it's not true.

To test if a square is out of bounds, you would just set the X's to -1 or 0 or
whatever value you choose to stand for "out of bounds". So you could say:

#define OUT_OF_BOUNDS -1

// ...

if(squares[x][y] != OUT_OF_BOUNDS)
    MakeMove(x,y);

That's pretty simple, but maybe you get the idea. If you just use an 8x8 array,
you'd have to test more and it would be a little slower. Unless Christophe has
some secret that none of the rest of us know about, I don't think this is very
important as long as you choose one that is reasonably efficient.

Russell



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.