aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-27 21:53:48 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-27 21:53:48 +0100
commitf19d991e099b0fc2253c7627cf76112d77a52c1d (patch)
tree8a3f8d61a23fab56cf0ae258d26d640e1841d794 /FICS
parent24e4859e08ccec3e81ddeb1405a10110973be565 (diff)
Reformatted GetRating()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/formula.c24
1 files 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)