From: Laurent Mazet Date: Thu, 25 Jul 2024 19:01:44 +0000 (+0200) Subject: missing tetriminos and correct colors X-Git-Tag: v1.1~3 X-Git-Url: https://secure.softndesign.org/git/?a=commitdiff_plain;h=8ac1245d2a05bb7f69a96fcc77c54c0c8516f49f;p=tetris.git missing tetriminos and correct colors --- diff --git a/constant.c b/constant.c index 0fcb035..6eaa78c 100644 --- a/constant.c +++ b/constant.c @@ -5,15 +5,16 @@ #include "constant.h" -#define _nb_blocks_std 6 +#define _nb_blocks_std 7 block_t _blocks_std[_nb_blocks_std] = { - {3, 2, 2, " .... "}, - {3, 2, 3, ".. .."}, - {2, 3, 4, ". . .."}, - {2, 3, 5, " . ..."}, - {2, 2, 6, "...."}, - {1, 4, 7, "...."} + {4, 1, 2, "...."}, + {2, 2, 4, "...."}, + {3, 2, 7, "... . "}, + {3, 2, 6, ".... "}, + {3, 2, 1, ". ..."}, + {3, 2, 5, ".. .."}, + {3, 2, 3, " .... "}, }; block_t *getblocks (char *name, int *nb) diff --git a/tetris.c b/tetris.c index 0e08014..c1b4d13 100644 --- a/tetris.c +++ b/tetris.c @@ -164,7 +164,8 @@ int main (int argc, char *argv[]) /* get blocks */ int nb_blocks = 0; block_t *blocks = getblocks ("std", &nb_blocks); - board_t *nextblock = initboard (maxblockwidth (blocks, nb_blocks) + 2, maxblockheight (blocks, nb_blocks)); + board_t *nextblock = initboard (maxblockwidth (blocks, nb_blocks) + 2, + maxblockheight (blocks, nb_blocks) + 2); setscale (nextblock, scale); /* init seed */