diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-03-30 13:19:55 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-03-30 13:19:55 +0100 |
commit | 0f8cc2ed7552327a56f16490e32187533395af41 (patch) | |
tree | 061db0d7fd3b733e445ede69ddc63bfa5f26d5c4 /FICS | |
parent | 1a404b66704772816119fcb6e8db4a7607157bf0 (diff) |
Reformatted Check50MoveRule() and made it private
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/gameproc.c | 23 |
1 files 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 * |