From c56ce351b9b0d79f7755c53b5be4ed776bb1508a Mon Sep 17 00:00:00 2001 From: Markus Uhlin Date: Sun, 5 May 2024 18:19:07 +0200 Subject: Reformatted functions --- FICS/movecheck.c | 40 +++++++++++++++++++++++----------------- 1 file changed, 23 insertions(+), 17 deletions(-) (limited to 'FICS') 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 -- cgit v1.2.3