From 76eeac799f3f52daca65d22d124cba0a0f9ee691 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Sun, 26 Feb 2012 22:45:12 +0100 Subject: [PATCH] Fix 50-move counter in ICS mode Marking irreversible moves in the EP_STATUS did not work in ICS mode, as ApplyMove,which did that is never executed there. Only the boards sent by ICS are displayed,especially in observing mode. Now the status is derived from the ICS mov strings (x in the SAN move, or P in the long move. --- backend.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletions(-) diff --git a/backend.c b/backend.c index 2553afb..f00997e 100644 --- a/backend.c +++ b/backend.c @@ -4509,7 +4509,10 @@ ParseBoard12 (char *string) r = boards[moveNum][CASTLING][5] = initialRights[5]; } /* [HGM] e.p. rights. Assume that ICS sends file number here? */ - boards[moveNum][EP_STATUS] = double_push == -1 ? EP_NONE : double_push + BOARD_LEFT; + boards[moveNum][EP_STATUS] = EP_NONE; + if(str[0] == 'P') boards[moveNum][EP_STATUS] = EP_PAWN_MOVE; + if(strchr(move_str, 'x')) boards[moveNum][EP_STATUS] = EP_CAPTURE; + if(double_push != -1) boards[moveNum][EP_STATUS] = double_push + BOARD_LEFT; if (ics_getting_history == H_GOT_REQ_HEADER || -- 1.7.0.4