aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-03-30 10:55:10 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-03-30 10:55:10 +0100
commit6b203dbffb61f7afe1aa3acffdc9958e493634f2 (patch)
treec4fe9b1881127304d691c8070006d6dc1cd2bdf2 /FICS
parent2697db43013ef9f1fcb3c9d29f59debedb308224 (diff)
Reformatted com_gonum()
Diffstat (limited to 'FICS')
-rw-r--r--FICS/gameproc.c62
1 files changed, 35 insertions, 27 deletions
diff --git a/FICS/gameproc.c b/FICS/gameproc.c
index 1c36c61..931679a 100644
--- a/FICS/gameproc.c
+++ b/FICS/gameproc.c
@@ -1560,35 +1560,43 @@ PUBLIC int com_goboard(int p, param_list param)
return COM_OK;
}
-PUBLIC int com_gonum(int p, param_list param)
+PUBLIC int
+com_gonum(int p, param_list param)
{
- int on, g, gamenum;
+ int on, g, gamenum;
- if (!parray[p].simul_info.numBoards) {
- pprintf(p, "You are not giving a simul.\n");
- return COM_OK;
- }
- on = parray[p].simul_info.onBoard;
- g = parray[p].simul_info.boards[on];
- gamenum = param[0].val.integer - 1;
- if (gamenum < 0)
- gamenum = 0;
- if (on == gamenum) {
- pprintf(p, "You are already at that board!\n");
- return COM_OK;
- }
- if (parray[p].simul_info.numBoards > 1) {
- player_decline_offers(p, -1, -PEND_SIMUL);
- if (player_goto_simulgame_bynum(p, gamenum) != -1) {
- if (g >= 0) {
- pprintf(garray[g].black, "\n");
- pprintf_highlight(garray[g].black, "%s", parray[p].name);
- pprintf_prompt(garray[g].black, " has moved away from your board.\n");
- }
- }
- } else
- pprintf(p, "You are only playing one board!\n");
- return COM_OK;
+ if (!parray[p].simul_info.numBoards) {
+ pprintf(p, "You are not giving a simul.\n");
+ return COM_OK;
+ }
+
+ on = parray[p].simul_info.onBoard;
+ g = parray[p].simul_info.boards[on];
+ gamenum = param[0].val.integer - 1;
+
+ if (gamenum < 0)
+ gamenum = 0;
+
+ if (on == gamenum) {
+ pprintf(p, "You are already at that board!\n");
+ return COM_OK;
+ }
+
+ if (parray[p].simul_info.numBoards > 1) {
+ player_decline_offers(p, -1, -PEND_SIMUL);
+
+ if (player_goto_simulgame_bynum(p, gamenum) != -1) {
+ if (g >= 0) {
+ pprintf(garray[g].black, "\n");
+ pprintf_highlight(garray[g].black, "%s",
+ parray[p].name);
+ pprintf_prompt(garray[g].black, " has moved "
+ "away from your board.\n");
+ }
+ }
+ } else
+ pprintf(p, "You are only playing one board!\n");
+ return COM_OK;
}
PUBLIC int