commit f19d991e099b0fc2253c7627cf76112d77a52c1d from: Markus Uhlin date: Wed Dec 27 20:53:48 2023 UTC Reformatted GetRating() commit - 24e4859e08ccec3e81ddeb1405a10110973be565 commit + f19d991e099b0fc2253c7627cf76112d77a52c1d blob - 980f7d8d747aa819dcb888223c372968cd9cd8ab blob + 6ee632a3a99209e900ffae8bac8c1858e7beebd0 --- FICS/formula.c +++ FICS/formula.c @@ -85,16 +85,22 @@ int MoveIndexPastString (char *string, int *i, char *t return (n); } /* end of function MoveIndexPastString. */ -/* GetRating simply chooses between blitz, standard and ratings. */ -int GetRating(player *p, int gametype) +int +GetRating(player *p, int gametype) { - if (gametype == TYPE_BLITZ) return (p->b_stats.rating); - else if (gametype == TYPE_STAND) return (p->s_stats.rating); - else if (gametype == TYPE_WILD) return (p->w_stats.rating); - else if (gametype == TYPE_LIGHT) return (p->l_stats.rating); - else if (gametype == TYPE_BUGHOUSE) return (p->bug_stats.rating); - else return 0; -} /* end of function GetRating. */ + if (gametype == TYPE_BLITZ) + return (p->b_stats.rating); + else if (gametype == TYPE_STAND) + return (p->s_stats.rating); + else if (gametype == TYPE_WILD) + return (p->w_stats.rating); + else if (gametype == TYPE_LIGHT) + return (p->l_stats.rating); + else if (gametype == TYPE_BUGHOUSE) + return (p->bug_stats.rating); + else + return 0; +} int GetNumberInsideParens(game *g, int clause, int *i, int *token, int eval)