missing tetriminos and correct colors
authorLaurent Mazet <mazet@softndesign.org>
Thu, 25 Jul 2024 19:01:44 +0000 (21:01 +0200)
committerLaurent Mazet <mazet@softndesign.org>
Thu, 25 Jul 2024 19:01:44 +0000 (21:01 +0200)
constant.c
tetris.c

index 0fcb035753002227ce2a0d089156c7954578aeb7..6eaa78cf0edfff9dee03b251870ab3ee7ebaf291 100644 (file)
@@ -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)
index 0e08014413791331701fd16f608eaf650c2f66a5..c1b4d13383564ead11af8f1cc9fe036ffcf7ca83 100644 (file)
--- 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 */