diff --git a/src/main/java/featurecat/lizzie/rules/SGFParser.java b/src/main/java/featurecat/lizzie/rules/SGFParser.java index 3456339ec..3cc146e50 100644 --- a/src/main/java/featurecat/lizzie/rules/SGFParser.java +++ b/src/main/java/featurecat/lizzie/rules/SGFParser.java @@ -121,7 +121,8 @@ private static boolean parse(String value) { Lizzie.leelaz.supportScoremean = false; } - // Detach engine for avoiding useless "play" and "undo" (#752). + // Detach engine for avoiding useless "play" and "undo" (#752) + // except for handicap stones in parseValue() (#765). Lizzie.leelaz.isAttached = false; parseValue(value, null, false); Lizzie.leelaz.isAttached = true; @@ -347,6 +348,8 @@ private static BoardHistoryList parseValue( } } } else { + // Setting handicap stones. We need to send "play" to the engine here. + Lizzie.leelaz.isAttached = true; if (move == null) { if (history == null) { Lizzie.board.pass(color); @@ -365,6 +368,7 @@ private static BoardHistoryList parseValue( } else { history.flatten(); } + Lizzie.leelaz.isAttached = false; } } else if (tag.equals("PB")) { blackPlayer = tagContent;