Remember position obtained from setup
authorH.G.Muller <hgm@hgm-xboard.(none)>
Sun, 12 Oct 2014 17:43:24 +0000 (19:43 +0200)
committerArun Persaud <arun@nubati.net>
Thu, 16 Oct 2014 03:40:20 +0000 (20:40 -0700)
When the engine sends a setup command, it should be remembered as
initialPosition, in order for the castling 'rook' test of the Betza
move generator to work.

backend.c

index 8c5ac40..1c684ad 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -8893,6 +8893,7 @@ FakeBookMove: // [HGM] book: we jump here to simulate machine moves after book h
       if(startedFromSetupPosition) return;
       ParseFEN(boards[0], &dummy, message+s, FALSE);
       DrawPosition(TRUE, boards[0]);
+      CopyBoard(initialPosition, boards[0]);
       startedFromSetupPosition = TRUE;
       return;
     }