10 typedef enum parse_code (*engine_notify
)(struct engine
*e
, struct board
*b
, int id
, char *cmd
, char *args
, char **reply
);
11 typedef char *(*engine_notify_play
)(struct engine
*e
, struct board
*b
, struct move
*m
);
12 typedef char *(*engine_result
)(struct engine
*e
, struct board
*b
);
13 typedef char *(*engine_chat
)(struct engine
*e
, struct board
*b
, char *cmd
);
14 /* Generate a move. If pass_all_alive is true, <pass> shall be generated only
15 * if all stones on the board can be considered alive, without regard to "dead"
16 * considered stones. */
17 typedef coord_t
*(*engine_genmove
)(struct engine
*e
, struct board
*b
, struct time_info
*ti
, enum stone color
, bool pass_all_alive
);
18 typedef char *(*engine_genmoves
)(struct engine
*e
, struct board
*b
, struct time_info
*ti
, enum stone color
,
19 char *args
, bool pass_all_alive
, void **stats_buf
, int *stats_size
);
20 /* One dead group per queued move (coord_t is (ab)used as group_t). */
21 typedef void (*engine_dead_group_list
)(struct engine
*e
, struct board
*b
, struct move_queue
*mq
);
22 /* e->data and e will be free()d by caller afterwards. */
23 typedef void (*engine_done
)(struct engine
*e
);
25 /* This is engine data structure. A new engine instance is spawned
26 * for each new game during the program lifetime. */
31 /* If set, do not reset the engine state on clear_board. */
35 board_cprint printhook
;
36 engine_notify_play notify_play
;
39 engine_genmove genmove
;
40 engine_genmoves genmoves
;
41 engine_dead_group_list dead_group_list
;