check_gameover_condition: 当无子可走时不时都定为游戏结束而是先看规则

This commit is contained in:
Calcitem 2020-09-20 21:28:42 +08:00
parent b88af2f95f
commit ae4c8a8b36
1 changed files with 1 additions and 3 deletions

View File

@ -1003,10 +1003,8 @@ bool Position::check_gameover_condition()
}
if (phase == PHASE_MOVING && action == ACTION_SELECT && is_all_surrounded()) {
// TODO: move to next branch
phase = PHASE_GAMEOVER;
if (rule.isLoseButNotChangeSideWhenNoWay) {
phase = PHASE_GAMEOVER;
gameoverReason = LOSE_REASON_NO_WAY;
winner = ~sideToMove;
return true;