diff options
-rw-r--r-- | tetris/tetris.c | 3 | ||||
-rw-r--r-- | tetris/tetris.h | 4 |
2 files changed, 3 insertions, 4 deletions
diff --git a/tetris/tetris.c b/tetris/tetris.c index 5a41c158..286e7c45 100644 --- a/tetris/tetris.c +++ b/tetris/tetris.c @@ -1,4 +1,4 @@ -/* $NetBSD: tetris.c,v 1.32 2016/03/03 21:38:55 nat Exp $ */ +/* $NetBSD: tetris.c,v 1.33 2020/07/21 02:42:05 nia Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -207,7 +207,6 @@ main(int argc, char *argv[]) scr_init(); setup_board(); - srandom(getpid()); scr_set(); pos = A_FIRST*B_COLS + (B_COLS/2)-1; diff --git a/tetris/tetris.h b/tetris/tetris.h index 7d18a2d1..8e1479f1 100644 --- a/tetris/tetris.h +++ b/tetris/tetris.h @@ -1,4 +1,4 @@ -/* $NetBSD: tetris.h,v 1.15 2016/03/03 21:38:55 nat Exp $ */ +/* $NetBSD: tetris.h,v 1.16 2020/07/21 02:42:05 nia Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -130,7 +130,7 @@ struct shape { }; extern const struct shape shapes[]; -#define randshape() (&shapes[random() % 7]) +#define randshape() (&shapes[arc4random_uniform(7)]) extern const struct shape *nextshape; |