summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/chess.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/mbbsd/chess.c b/mbbsd/chess.c
index ca99bfaf..d1ad3ad0 100644
--- a/mbbsd/chess.c
+++ b/mbbsd/chess.c
@@ -387,9 +387,12 @@ ChessReplayUntil(ChessInfo* info, int n)
/* spcial for last one to maintian information correct */
step = ChessHistoryRetrieve(info, info->current_step);
- info->turn = info->current_step++ & 1;
+
+ if (info->mode == CHESS_MODE_WATCH || info->mode == CHESS_MODE_REPLAY)
+ info->turn = info->current_step & 1;
info->actions->prepare_step(info, step);
info->actions->apply_step(info->board, step);
+ info->current_step++;
}
static int
@@ -779,7 +782,6 @@ ChessPlayFuncWatch(ChessInfo* info)
/* at head but redo-ed */
info->actions->init_board(info->board);
info->current_step = 0;
- info->turn = 1;
ChessReplayUntil(info, info->history.used - 1);
ChessRedraw(info);
}