From ec9103d9b70113ae109688b7bbaae07ad31a1d1b Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 31 Dec 2023 13:58:26 +0100 Subject: Reformatted player_num_active_boards() --- FICS/playerdb.c | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) (limited to 'FICS') diff --git a/FICS/playerdb.c b/FICS/playerdb.c index a275c4f..566cb16 100644 --- a/FICS/playerdb.c +++ b/FICS/playerdb.c @@ -1841,16 +1841,20 @@ PUBLIC int player_goto_simulgame_bynum(int p, int num) return player_goto_board(p, on); } -PUBLIC int player_num_active_boards(int p) +PUBLIC int +player_num_active_boards(int p) { - int count = 0, i; + int count = 0; - if (!parray[p].simul_info.numBoards) - return 0; - for (i = 0; i < parray[p].simul_info.numBoards; i++) - if (parray[p].simul_info.boards[i] >= 0) - count++; - return count; + if (!parray[p].simul_info.numBoards) + return 0; + + for (int i = 0; i < parray[p].simul_info.numBoards; i++) { + if (parray[p].simul_info.boards[i] >= 0) + count++; + } + + return count; } PUBLIC int -- cgit v1.2.3