can_countercapture(): foolproof api
[pachi.git] / tactics / 1lib.h
blobd380732b6ee12fea44e98b7dd4328e7e36b4411e
1 #ifndef PACHI_TACTICS_1LIB_H
2 #define PACHI_TACTICS_1LIB_H
4 /* One-liberty tactical checks (i.e. dealing with atari situations). */
6 #include "board.h"
7 #include "debug.h"
9 struct move_queue;
12 /* Can group @group usefully capture a neighbor ?
13 * (usefully: not a snapback) */
14 bool can_countercapture(struct board *b, group_t group, struct move_queue *q, int tag);
15 /* Can group @group capture *any* neighbor ? */
16 bool can_countercapture_any(struct board *b, group_t group, struct move_queue *q, int tag);
18 /* Examine given group in atari, suggesting suitable moves for player
19 * @to_play to deal with it (rescuing or capturing it). */
20 /* ladder != NULL implies to always enqueue all relevant moves. */
21 void group_atari_check(unsigned int alwaysccaprate, struct board *b, group_t group, enum stone to_play,
22 struct move_queue *q, coord_t *ladder, bool middle_ladder, int tag);
24 #endif