From: Laurent Mazet Date: Thu, 4 Jul 2024 21:46:44 +0000 (+0200) Subject: add board 12x12 X-Git-Tag: v1.0~23 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=d75484b64825a65ccc9a7f3e09c0232f6c68c10b;p=checkers.git add board 12x12 --- 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); }