From f19d991e099b0fc2253c7627cf76112d77a52c1d Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Wed, 27 Dec 2023 21:53:48 +0100 Subject: Reformatted GetRating() --- FICS/formula.c | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/FICS/formula.c b/FICS/formula.c index 980f7d8..6ee632a 100644 --- a/FICS/formula.c +++ b/FICS/formula.c @@ -85,16 +85,22 @@ int MoveIndexPastString (char *string, int *i, char *text) 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) -- cgit v1.2.3