check_gameover_condition: 当无子可走时不时都定为游戏结束而是先看规则
This commit is contained in:
parent
b88af2f95f
commit
ae4c8a8b36
|
@ -1003,10 +1003,8 @@ bool Position::check_gameover_condition()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (phase == PHASE_MOVING && action == ACTION_SELECT && is_all_surrounded()) {
|
if (phase == PHASE_MOVING && action == ACTION_SELECT && is_all_surrounded()) {
|
||||||
// TODO: move to next branch
|
|
||||||
phase = PHASE_GAMEOVER;
|
|
||||||
|
|
||||||
if (rule.isLoseButNotChangeSideWhenNoWay) {
|
if (rule.isLoseButNotChangeSideWhenNoWay) {
|
||||||
|
phase = PHASE_GAMEOVER;
|
||||||
gameoverReason = LOSE_REASON_NO_WAY;
|
gameoverReason = LOSE_REASON_NO_WAY;
|
||||||
winner = ~sideToMove;
|
winner = ~sideToMove;
|
||||||
return true;
|
return true;
|
||||||
|
|
Loading…
Reference in New Issue