Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question:1.hashtable 2.board 3.C

Author: Tom Kerrigan

Date: 14:06:57 06/13/00

Go up one level in this thread


On June 13, 2000 at 16:10:05, Christophe Theron wrote:

>With the other approach, you need a table lookup to tell that the square is not
>inside the board:
>
>  // 12x12 way:
>  if (board[square]==-1) it_is_outside;
>  else                   it_is_inside;

If your board starts out being 12x12, then you're right, it doesn't really make
a difference if you switch to 0x88.

However, I know that a number of programs use an 8x8 board. To do the bounds
testing, they convert the 8x8 offset into a 10x12 offset and then back again.
You can see this done in TSCP. This method is obviously a loser compared to
0x88.

-Tom



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.