Fix eval flip on WB color commands
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 16 Jan 2010 13:26:36 +0000 (14:26 +0100)
committerH.G. Muller <h.g.muller@hccnet.nl>
Sat, 16 Jan 2010 13:26:36 +0000 (14:26 +0100)
The differential eval Q was not flipped when the WB-protocol command
black or white did change the side to move.

fairymax.c

index 4db818e..e615fd4 100644 (file)
@@ -623,12 +623,14 @@ int main(int argc, char **argv)
                }\r
                if (!strcmp(command, "white")) {\r
                         /* set white to move in current position */\r
+                        if(Side == BLACK) Q = -Q;\r
                         Side     = WHITE;\r
                         Computer = BLACK;\r
                        continue;\r
                }\r
                if (!strcmp(command, "black")) {\r
                         /* set blck to move in current position */\r
+                        if(Side == WHITE) Q = -Q;\r
                         Side     = BLACK;\r
                         Computer = WHITE;\r
                        continue;\r