1 #ifndef ZZGO_PATTERN3_H
2 #define ZZGO_PATTERN3_H
4 /* Fast matching of simple 3x3 patterns. */
10 /* Hashtable: 2*8 bits (ignore middle point, 2 bits per intersection) */
11 /* Value: 0: no pattern, 1: black pattern,
12 * 2: white pattern, 3: both patterns */
16 /* Source pattern encoding:
17 * X: black; O: white; .: empty; #: edge
18 * x: !black; o: !white; ?: any
20 * extra X: pattern valid only for one side;
21 * middle point ignored. */
23 void pattern3s_init(struct pattern3s
*p
, char src
[][11], int src_n
);
25 bool test_pattern3_here(struct pattern3s
*p
, struct board
*b
, struct move
*m
);