diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-23 22:18:17 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-23 22:18:17 +0100 |
commit | c504015ae2ec1a92e3517c5462cb1105deccee24 (patch) | |
tree | e8aff1407be16bfcff037db9ea28c11fa9109ae1 | |
parent | aca6f5394e23d3150b8b1455efb1a149786f584f (diff) |
Reformatted style13()
-rw-r--r-- | FICS/board.c | 48 |
1 files changed, 34 insertions, 14 deletions
diff --git a/FICS/board.c b/FICS/board.c index 69ed76b..03fbf78 100644 --- a/FICS/board.c +++ b/FICS/board.c @@ -331,21 +331,41 @@ PRIVATE int genstyle(game_state_t *b, move_t *ml, char *wp[], char *bp[], return 0; } -/* Experimental ANSI board for colour representation */ -PUBLIC int style13(game_state_t *b, move_t *ml) +/* + * Experimental ANSI board for colour representation + */ +PUBLIC int +style13(game_state_t *b, move_t *ml) { - static char *wp[] = {" ", "\033[37m\033[1m P ", "\033[37m\033[1m N ", "\033[37m\033[1m B ", "\033[37m\033[1m R ", "\033[37m\033[1m Q ", "\033[37m\033[1m K "}; - static char *bp[] = {" ", "\033[21m\033[37m P ", "\033[21m\033[37m N ", "\033[21m\033[37m B ", "\033[21m\033[37m R ", "\033[21m\033[37m Q ", "\033[21m\033[37m K "}; - static char *wsqr = "\033[40m"; - static char *bsqr = "\033[45m"; - static char *top = "\t+------------------------+\n"; - static char *mid = ""; - static char *start = "|"; - static char *end = "\033[0m|"; - static char *label = "\t a b c d e f g h\n"; - static char *blabel = "\t h g f e d c b a\n"; - - return genstyle(b, ml, wp, bp, wsqr, bsqr, top, mid, start, end, label, blabel); + static char *wp[] = { + " ", + "\033[37m\033[1m P ", + "\033[37m\033[1m N ", + "\033[37m\033[1m B ", + "\033[37m\033[1m R ", + "\033[37m\033[1m Q ", + "\033[37m\033[1m K " + }; + static char *bp[] = { + " ", + "\033[21m\033[37m P ", + "\033[21m\033[37m N ", + "\033[21m\033[37m B ", + "\033[21m\033[37m R ", + "\033[21m\033[37m Q ", + "\033[21m\033[37m K " + }; + static char *wsqr = "\033[40m"; + static char *bsqr = "\033[45m"; + static char *top = "\t+------------------------+\n"; + static char *mid = ""; + static char *start = "|"; + static char *end = "\033[0m|"; + static char *label = "\t a b c d e f g h\n"; + static char *blabel = "\t h g f e d c b a\n"; + + return genstyle(b, ml, wp, bp, wsqr, bsqr, top, mid, start, end, label, + blabel); } /* |