aboutsummaryrefslogtreecommitdiffstats
path: root/FICS/board.c
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2023-12-24 00:18:07 +0100
committerMarkus Uhlin <markus@nifty-networks.net>2023-12-24 00:18:07 +0100
commitdd195e8cc04a8fce04b478966f264cb2e39c2dfe (patch)
treec96b9a00e8cfeed1cfaa92c742d0b7858bd5bd0d /FICS/board.c
parent165fd508be34f84465bf86a20e7a5a9e0965e925 (diff)
Reformatted board_init()
Diffstat (limited to 'FICS/board.c')
-rw-r--r--FICS/board.c36
1 files changed, 21 insertions, 15 deletions
diff --git a/FICS/board.c b/FICS/board.c
index f41c411..ca2f5fa 100644
--- a/FICS/board.c
+++ b/FICS/board.c
@@ -92,22 +92,28 @@ PRIVATE int orient;
PRIVATE int forPlayer;
PRIVATE int myTurn;
-PUBLIC int board_init(game_state_t *b, char *category, char *board)
+PUBLIC int
+board_init(game_state_t *b, char *category, char *board)
{
- int retval;
- int wval;
-
- if (!category || !board || !category[0] || !board[0])
- retval = board_read_file("standard", "standard", b);
- else {
- if (!strcmp(category, "wild")) {
- if (sscanf(board, "%d", &wval) == 1 && wval >= 1 && wval <= 4)
- wild_update(wval);
- }
- retval = board_read_file(category, board, b);
- }
- b->gameNum = -1;
- return retval;
+ int retval;
+ int wval;
+
+ if (category == NULL || board == NULL ||
+ !category[0] || !board[0]) {
+ retval = board_read_file("standard", "standard", b);
+ } else {
+ if (!strcmp(category, "wild")) {
+ if (sscanf(board, "%d", &wval) == 1 &&
+ wval >= 1 &&
+ wval <= 4)
+ wild_update(wval);
+ }
+
+ retval = board_read_file(category, board, b);
+ }
+
+ b->gameNum = -1;
+ return retval;
}
PUBLIC void