Merge branch 'master' into atomic2
[pachi/peepo.git] / joseki / base.h
blob4062af7ae8aaafcf9593693d7963aaa62b97021a
1 #ifndef PACHI_JOSEKI_BASE_H
2 #define PACHI_JOSEKI_BASE_H
4 #include "board.h"
6 /* Single joseki situation - moves for S_BLACK-1, S_WHITE-1. */
7 struct joseki_pattern {
8 /* moves[] is a pass-terminated list or NULL */
9 coord_t *moves[2];
12 /* The joseki dictionary for given board size. */
13 struct joseki_dict {
14 int bsize;
16 #define joseki_hash_bits 20 // 8M w/ 32-bit pointers
17 #define joseki_hash_mask ((1 << joseki_hash_bits) - 1)
18 struct joseki_pattern *patterns;
21 struct joseki_dict *joseki_init(int bsize);
22 struct joseki_dict *joseki_load(int bsize);
23 void joseki_done(struct joseki_dict *);
25 #endif