From 58eec56aaa59cbd7b493f96b4a9499c0a00e35ff Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 31 Dec 2023 14:22:55 +0100 Subject: Reformatted player_game_ended() --- FICS/playerdb.c | 27 ++++++++++++++------------- 1 file 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 -- cgit v1.2.3