From b88af2f95f5bae9d735b8dfc9cde41072f048c31 Mon Sep 17 00:00:00 2001 From: Calcitem Date: Sun, 20 Sep 2020 21:26:25 +0800 Subject: [PATCH] =?UTF-8?q?rule:=20=E6=9B=B4=E5=90=8D=E4=B8=BA=20isLoseBut?= =?UTF-8?q?NotChangeSideWhenNoWay?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/evaluate.cpp | 2 +- src/position.cpp | 2 +- src/rule.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index a35661ff..01c63b4c 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -135,7 +135,7 @@ Value Evaluation::value() } } else if (pos.action == ACTION_SELECT && pos.is_all_surrounded() && - rule.isLoseButNotChangeTurnWhenNoWay) { + rule.isLoseButNotChangeSideWhenNoWay) { Value delta = pos.sideToMove == BLACK ? -VALUE_MATE : VALUE_MATE; value += delta; } diff --git a/src/position.cpp b/src/position.cpp index 21ce6420..b7f14f09 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1006,7 +1006,7 @@ bool Position::check_gameover_condition() // TODO: move to next branch phase = PHASE_GAMEOVER; - if (rule.isLoseButNotChangeTurnWhenNoWay) { + if (rule.isLoseButNotChangeSideWhenNoWay) { gameoverReason = LOSE_REASON_NO_WAY; winner = ~sideToMove; return true; diff --git a/src/rule.h b/src/rule.h index 67c7b01f..50fd114f 100644 --- a/src/rule.h +++ b/src/rule.h @@ -35,7 +35,7 @@ struct Rule bool allowRemoveMultiPiecesWhenCloseMultiMill; bool allowRemovePieceInMill; bool isBlackLosebutNotDrawWhenBoardFull; - bool isLoseButNotChangeTurnWhenNoWay; + bool isLoseButNotChangeSideWhenNoWay; bool allowFlyWhenRemainThreePieces; Step maxStepsLedToDraw; };