From d75484b64825a65ccc9a7f3e09c0232f6c68c10b Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Thu, 4 Jul 2024 23:46:44 +0200 Subject: [PATCH] add board 12x12 --- constant.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) diff --git a/constant.c b/constant.c index e04d429..259942e 100644 --- a/constant.c +++ b/constant.c @@ -31,6 +31,22 @@ board_t _board_10x10 = { ". . . . . ", 0, 0, 0, 0, 0, 0}; +board_t _board_12x12 = { + 12, 12, + " . . . . . ." + ". . . . . . " + " . . . . . ." + ". . . . . . " + " . . . . . ." + ". . . . . . " + " . . . . . ." + ". . . . . . " + " . . . . . ." + ". . . . . . " + " . . . . . ." + ". . . . . . ", + 0, 0, 0, 0, 0, 0}; + board_t *getboard (char *name) { board_t *pt = NULL; @@ -39,8 +55,10 @@ board_t *getboard (char *name) pt = &_board_8x8; } else if (strcmp (name, "10x10") == 0) { pt = &_board_10x10; + } else if (strcmp (name, "12x12") == 0) { + pt = &_board_12x12; } else if (strcmp (name, "list") == 0) { - printf ("board: 8x8 10x10\n"); + printf ("board: 8x8 10x10 12x12\n"); pt = (board_t *)(-1); } -- 2.30.2