Reset machine colors after match
authorH.G. Muller <h.g.muller@hccnet.nl>
Sat, 8 Jan 2011 23:21:41 +0000 (00:21 +0100)
committerArun Persaud <arun@nubati.net>
Tue, 11 Jan 2011 05:22:05 +0000 (21:22 -0800)
The colors each engine playse are set to the originals after the last
match game, so that a new match or two-machines game will not have
swapped colors.

backend.c

index 8169707..df586fd 100644 (file)
--- a/backend.c
+++ b/backend.c
@@ -9453,6 +9453,13 @@ GameEnds(result, resultDetails, whosays)
                     first.matchWins, second.matchWins,
                     appData.matchGames - (first.matchWins + second.matchWins));
            popupRequested++; // [HGM] crash: postpone to after resetting endingGame
+           if (appData.firstPlaysBlack) { // [HGM] match: back to original for next match
+               first.twoMachinesColor = "black\n";
+               second.twoMachinesColor = "white\n";
+           } else {
+               first.twoMachinesColor = "white\n";
+               second.twoMachinesColor = "black\n";
+           }
        }
     }
     if ((gameMode == AnalyzeMode || gameMode == AnalyzeFile) &&