commit 0f8cc2ed7552327a56f16490e32187533395af41 from: Markus Uhlin date: Sat Mar 30 12:19:55 2024 UTC Reformatted Check50MoveRule() and made it private commit - 1a404b66704772816119fcb6e8db4a7607157bf0 commit + 0f8cc2ed7552327a56f16490e32187533395af41 blob - ce6e5b5aa8a580e69aa29e378886ef9eb44fc8f5 blob + 67b5b57814cf3026bcd411be6b19743cd7f66fb2 --- FICS/gameproc.c +++ 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 *