aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-31 14:22:55 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-31 14:22:55 +0100
commit58eec56aaa59cbd7b493f96b4a9499c0a00e35ff (patch)
tree8a7be1093d7989736440acfa6c8d9c91b96fc95e
parent542775da66ca018f7951a7df990777c6c4a54a5c (diff)
Reformatted player_game_ended()
-rw-r--r--FICS/playerdb.c27
1 files changed, 14 insertions, 13 deletions
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 0a8805e..048ad38 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -1706,21 +1706,22 @@ PUBLIC int player_remove_observe(int p, int g)
return 0;
}
-PUBLIC int player_game_ended(int g)
+PUBLIC int
+player_game_ended(int g)
{
- int p;
+ for (int p = 0; p < p_num; p++) {
+ if (parray[p].status == PLAYER_EMPTY)
+ continue;
+ player_remove_observe(p, g);
+ }
- for (p = 0; p < p_num; p++) {
- if (parray[p].status == PLAYER_EMPTY)
- continue;
- player_remove_observe(p, g);
- }
- player_remove_request(garray[g].white, garray[g].black, -1);
- player_remove_request(garray[g].black, garray[g].white, -1);
- player_save(garray[g].white); /* Hawk: Added to save finger-info after each
- game */
- player_save(garray[g].black);
- return 0;
+ player_remove_request(garray[g].white, garray[g].black, -1);
+ player_remove_request(garray[g].black, garray[g].white, -1);
+
+ player_save(garray[g].white);
+ player_save(garray[g].black);
+
+ return 0;
}
PUBLIC int