X-Git-Url: http://winboard.nl/cgi-bin?p=capablanca.git;a=blobdiff_plain;f=lasker-2.2.3%2Fsrc%2Fratings.c;h=6a6f6296fb02e207baa995aefa750768c6eb6129;hp=55eaa74bbf8e89d7cc30b585a4137fc5a7470201;hb=e0c6e5ba79b1df3450fda89f9e7beacdc62103d1;hpb=707e46a1e2dba3ef53b97c63520d50f4ecc3996b diff --git a/lasker-2.2.3/src/ratings.c b/lasker-2.2.3/src/ratings.c index 55eaa74..6a6f629 100644 --- a/lasker-2.2.3/src/ratings.c +++ b/lasker-2.2.3/src/ratings.c @@ -102,7 +102,7 @@ static void rating_add(int rating, int type) } Ratings_B_StdDev = sqrt(Rb_S / Rb_count); Ratings_B_Average = Rb_total / (double) Rb_count; - } else if (type == TYPE_WILD) { /* TYPE_WILD */ + } else if (type == TYPE_WILD || type == TYPE_KNIGHTMATE || type == TYPE_GOTHIC || type == TYPE_CAPABLANCA) { /* TYPE_WILD */ wHist[which] += 1; Rw_count++; Rw_total += rating; @@ -186,7 +186,7 @@ static void rating_remove(int rating, int type) Ratings_B_StdDev = 0; Ratings_B_Average = 0; } - } else if (type == TYPE_WILD) { /* TYPE_WILD */ + } else if (type == TYPE_WILD || type == TYPE_KNIGHTMATE || type == TYPE_GOTHIC || type == TYPE_CAPABLANCA) { /* TYPE_WILD */ wHist[which] = wHist[which] - 1; if (wHist[which] < 0) wHist[which] = 0; @@ -466,6 +466,9 @@ static void GetCurrentStats (int p, int *r, double *s, int *new, p_stats = &pp->s_stats; break; case TYPE_WILD: + case TYPE_KNIGHTMATE: + case TYPE_CAPABLANCA: + case TYPE_GOTHIC: p_stats = &pp->w_stats; break; case TYPE_LIGHT: @@ -549,7 +552,10 @@ int rating_update(int g, int link_game) } else if (game_globals.garray[g].type == TYPE_STAND) { w_stats = &player_globals.parray[game_globals.garray[g].white].s_stats; b_stats = &player_globals.parray[game_globals.garray[g].black].s_stats; - } else if (game_globals.garray[g].type == TYPE_WILD) { + } else if (game_globals.garray[g].type == TYPE_WILD + || game_globals.garray[g].type == TYPE_KNIGHTMATE + || game_globals.garray[g].type == TYPE_GOTHIC + || game_globals.garray[g].type == TYPE_CAPABLANCA) { w_stats = &player_globals.parray[game_globals.garray[g].white].w_stats; b_stats = &player_globals.parray[game_globals.garray[g].black].w_stats; } else if (game_globals.garray[g].type == TYPE_LIGHT) { @@ -692,7 +698,10 @@ int rating_update(int g, int link_game) } else if (game_globals.garray[g].type == TYPE_BUGHOUSE) { Rbug_count++; Rbug_total += (w_stats->rating + b_stats->rating) / 2.0; - } else if (game_globals.garray[g].type == TYPE_WILD) { + } else if (game_globals.garray[g].type == TYPE_WILD + || game_globals.garray[g].type == TYPE_KNIGHTMATE + || game_globals.garray[g].type == TYPE_CAPABLANCA + || game_globals.garray[g].type == TYPE_GOTHIC) { Rw_count++; Rw_total += (w_stats->rating + b_stats->rating) / 2.0; }