From 0f8cc2ed7552327a56f16490e32187533395af41 Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sat, 30 Mar 2024 13:19:55 +0100 Subject: Reformatted Check50MoveRule() and made it private --- FICS/gameproc.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) diff --git a/FICS/gameproc.c b/FICS/gameproc.c index ce6e5b5..67b5b57 100644 --- a/FICS/gameproc.c +++ b/FICS/gameproc.c @@ -731,18 +731,21 @@ PUBLIC int com_resign(int p, param_list param) return COM_OK; } -int Check50MoveRule (int p, int g) +PRIVATE int +Check50MoveRule(int p, int g) { - int num_reversible = garray[g].numHalfMoves; + int num_reversible = garray[g].numHalfMoves; - if (garray[g].game_state.lastIrreversable >= 0) { - num_reversible -= garray[g].game_state.lastIrreversable; - } - if (num_reversible > 99) { - game_ended(g, (garray[g].white == p) ? BLACK : WHITE, END_50MOVERULE); - return 1; - } - return 0; + if (garray[g].game_state.lastIrreversable >= 0) + num_reversible -= garray[g].game_state.lastIrreversable; + + if (num_reversible > 99) { + game_ended(g, (garray[g].white == p ? BLACK : WHITE), + END_50MOVERULE); + return 1; + } + + return 0; } PRIVATE char * -- cgit v1.2.3