aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/playerdb.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-31 14:02:52 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-31 14:02:52 +0100
commit6e0ab494d3ef43ef37d25ce5249dd6d5a1ce1bd8 (patch)
tree3fa26ef3005f875b43da2c3b26a5d271e73fb957 /FICS/playerdb.c
parentec9103d9b70113ae109688b7bbaae07ad31a1d1b (diff)
Reformatted player_goto_simulgame_bynum()
Diffstat (limited to 'FICS/playerdb.c')
-rw-r--r--FICS/playerdb.c43
1 files changed, 24 insertions, 19 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 566cb16..fd36646 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -1818,27 +1818,32 @@ PUBLIC int player_goto_prev_board(int p)
return player_goto_board(p, on);
}
-PUBLIC int player_goto_simulgame_bynum(int p, int num)
+PUBLIC int
+player_goto_simulgame_bynum(int p, int num)
{
- int on;
- int start;
- int g;
+ int g;
+ int on;
+ int start;
- on = parray[p].simul_info.onBoard;
- start = on;
- do {
- on++;
- if (on >= parray[p].simul_info.numBoards)
- on = 0;
- g = parray[p].simul_info.boards[on];
- if (g == num)
- break;
- } while (start != on);
- if (g != num) {
- pprintf(p, "\nYou aren't playing that game!!\n");
- return -1;
- }
- return player_goto_board(p, on);
+ on = parray[p].simul_info.onBoard;
+ start = on;
+
+ do {
+ on++;
+
+ if (on >= parray[p].simul_info.numBoards)
+ on = 0;
+
+ if ((g = parray[p].simul_info.boards[on]) == num)
+ break;
+ } while (start != on);
+
+ if (g != num) {
+ pprintf(p, "\nYou aren't playing that game!!\n");
+ return -1;
+ }
+
+ return player_goto_board(p, on);
}
PUBLIC int