Probdist: Make items[] contain the sums instead of individual probabilities
[pachi.git] / engine.h
blob16b672ed02fd335e0062518a2bbf7d0a45375243
1 #ifndef ZZGO_ENGINE_H
2 #define ZZGO_ENGINE_H
4 #include "board.h"
5 #include "move.h"
7 struct engine;
8 struct move_queue;
10 typedef char *(*engine_notify_play)(struct engine *e, struct board *b, struct move *m);
11 typedef char *(*engine_chat)(struct engine *e, struct board *b, char *cmd);
12 typedef coord_t *(*engine_genmove)(struct engine *e, struct board *b, enum stone color);
13 /* One dead group per queued move (coord_t is (ab)used as group_t). */
14 typedef void (*engine_dead_group_list)(struct engine *e, struct board *b, struct move_queue *mq);
15 typedef void (*engine_done_board_state)(struct engine *e, struct board *b);
16 /* Pachi exit hook. */
17 typedef void (*engine_finish)(struct engine *e);
19 struct engine {
20 char *name;
21 char *comment;
22 board_cprint printhook;
23 engine_notify_play notify_play;
24 engine_chat chat;
25 engine_genmove genmove;
26 engine_dead_group_list dead_group_list;
27 engine_done_board_state done_board_state;
28 engine_finish finish;
29 void *data;
32 #endif