diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2024-05-05 18:19:07 +0200 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2024-05-05 18:19:07 +0200 |
commit | c56ce351b9b0d79f7755c53b5be4ed776bb1508a (patch) | |
tree | 169769ffc61814e2c0ca8d7bf5c4363c3cc51603 /FICS | |
parent | d0e138e7af3d0d8940797a6fb7b95cc8ff2f7b98 (diff) |
Reformatted functions
Diffstat (limited to 'FICS')
-rw-r--r-- | FICS/movecheck.c | 40 |
1 files changed, 23 insertions, 17 deletions
diff --git a/FICS/movecheck.c b/FICS/movecheck.c index 0bc953e..e730432 100644 --- a/FICS/movecheck.c +++ b/FICS/movecheck.c @@ -111,27 +111,33 @@ PUBLIC int is_move(char *mstr) } -PUBLIC int NextPieceLoop(board_t b, int *f, int *r, int color) +PUBLIC int +NextPieceLoop(board_t b, int *f, int *r, int color) { - while (1) { - (*r) = (*r) + 1; - if (*r > 7) { - *r = 0; - *f = *f + 1; - if (*f > 7) - break; - } - if ((b[*f][*r] != NOPIECE) && iscolor(b[*f][*r], color)) - return 1; - } - return 0; + while (1) { + (*r) = (*r) + 1; + + if (*r > 7) { + *r = 0; + *f = *f + 1; + + if (*f > 7) + break; + } + + if ((b[*f][*r] != NOPIECE) && iscolor(b[*f][*r], color)) + return 1; + } + + return 0; } -PUBLIC int InitPieceLoop(board_t b, int *f, int *r, int color) +PUBLIC int +InitPieceLoop(board_t b, int *f, int *r, int color) { - *f = 0; - *r = -1; - return 1; + *f = 0; + *r = -1; + return 1; } PRIVATE int |