From 85358ceff685e6f09774aaeaabd8678fc890f570 Mon Sep 17 00:00:00 2001 From: Lennard Sprong Date: Mon, 9 Sep 2024 13:49:41 +0200 Subject: [PATCH] turnaround: Add isCmp for hatenas --- src/variety/turnaround.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/variety/turnaround.js b/src/variety/turnaround.js index c8a25de72..014911ac7 100644 --- a/src/variety/turnaround.js +++ b/src/variety/turnaround.js @@ -22,14 +22,15 @@ maxnum: 3, isCmp: function() { - if (!this.puzzle.execConfig("autocmp")) { + if (!this.puzzle.execConfig("autocmp") || !this.isNum()) { return false; } - return this.qnum === this.countTurn(); + var count = this.countTurn(); + return this.qnum === count || (this.qnum === -2 && count >= 0); }, countTurn: function() { - if (!this.isNum() || this.lcnt !== 2) { + if (this.lcnt !== 2) { return -1; }