aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2024-03-17 22:01:34 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2024-03-17 22:01:34 +0100
commitb34d7c64d89fcf05a0372f837f7ac5789ebff266 (patch)
tree9b66c37b6bbf4108fd122280d680dd5a804e0457
parentc37aab377021b45c86c6c19856cb2bb08ddbcedc (diff)
Reformatted NextPieceLoop()
-rw-r--r--FICS/movecheck.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/FICS/movecheck.c b/FICS/movecheck.c
index ce4db9a..6c93f9e 100644
--- a/FICS/movecheck.c
+++ b/FICS/movecheck.c
@@ -112,21 +112,25 @@ PUBLIC int is_move(char *mstr)
return alg_is_move(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