In the engine I've been working on for a week or two (I'm brand new to
computer-go)
I use:
typedef int INTERSECTION;
typedef enum { BLACK, WHITE, EMPTY } COLOR;
struct GROUP
{
   INTERSECTION base;
   COLOR color;
   int count;
   int liberties;
   INTERSECTION children[5];
   INTERSECTION parent;
};
struct BOARD
{
   COLOR side_tm;
   COLOR board[BOARD_SIZE * BOARD_SIZE];
   struct GROUP group_list[BOARD_SIZE * BOARD_SIZE];
   struct GROUP *group[BOARD_SIZE * BOARD_SIZE];
   int group_count;
   int real_group_count;
   INTERSECTION empty_list[BOARD_SIZE * BOARD_SIZE];
   int empty_index[BOARD_SIZE * BOARD_SIZE];
   int empty_count;
};

I've just finished implementing the basic rules. I'm now working on
detecting the end of the game and scoring. I think this is a pretty
standard data structure. I do know that bitboards can be used, with
one integer usually representing a row.
_______________________________________________
computer-go mailing list
computer-go@computer-go.org
http://www.computer-go.org/mailman/listinfo/computer-go/

Reply via email to