Fix mamer crash on listmanagers command
[capablanca.git] / lasker-2.2.3 / bots / mamer / TourneyPlayers.cc
index 2d9ea53..e967edc 100644 (file)
@@ -180,6 +180,7 @@ void TourneyPlayers::ChangeColorDue(int value) {
 //- AddWhite ---------------------------------
 void TourneyPlayers::AddWhite(void) {
   consecutiveWhites++;
+  totalWhites++; // [HGM] this varable did not seem to get updater anywhere
   ChangeColorDue(0);
   ClearBlacks();
 }//- end AddWhite  
@@ -187,6 +188,7 @@ void TourneyPlayers::AddWhite(void) {
 //- AddBlack ---------------------------------
 void TourneyPlayers::AddBlack(void) {
   consecutiveBlacks++;
+  totalBlacks++; // [HGM] this varable did not seem to get updater anywhere
   ChangeColorDue(1);
   ClearWhites();
 }//- end AddBlack
@@ -201,6 +203,16 @@ void TourneyPlayers::ClearBlacks(void) {
   consecutiveBlacks = 0;
 }//- end ClearBlacks
 
+//- ClearTotalWhites ---------------------------------
+void TourneyPlayers::ClearTotalWhites(void) {
+  totalWhites = 0;
+}//- end ClearTotalWhites
+
+//- ClearTotalBlacks ---------------------------------
+void TourneyPlayers::ClearTotalBlacks(void) {
+  totalBlacks = 0;
+}//- end ClearTotalBlacks
+
 //- GetTotalWhites ---------------------------------
 int TourneyPlayers::GetTotalWhites(void) {
   return totalWhites;