From 702494042ae05dc98a48ab439fcf1905a6b318dd Mon Sep 17 00:00:00 2001 From: lemonsqueeze Date: Thu, 9 Jun 2016 22:39:52 +0200 Subject: [PATCH] selfatari_cousin(): fixed invalid can_countercapture() calls --- tactics/selfatari.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tactics/selfatari.c b/tactics/selfatari.c index 09dd159..2a2bb3a 100644 --- a/tactics/selfatari.c +++ b/tactics/selfatari.c @@ -738,7 +738,8 @@ found:; coord_t lib2; /* Can we get liberties by capturing a neighbor? */ struct move_queue ccq; ccq.moves = 0; - if (can_countercapture(b, color, group, color, &ccq, 0)) { + if (board_at(b, group) == color && + can_countercapture(b, color, group, color, &ccq, 0)) { lib2 = mq_pick(&ccq); } else { -- 2.11.4.GIT