diff options
author | Ian C <ianc@noddybox.co.uk> | 2020-10-31 23:24:12 +0000 |
---|---|---|
committer | Ian C <ianc@noddybox.co.uk> | 2020-10-31 23:24:12 +0000 |
commit | 85509c6b2a52b5dd614538248706a49bde315f53 (patch) | |
tree | dd8f8a1894a8e465d82113b090da0d6d926e77b1 | |
parent | eb45a34b4a0881b227cb1a461ca1fcb77e593865 (diff) |
Added optional arguement to seed random number
-rw-r--r-- | csol.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -146,7 +146,14 @@ int main(int argc, char *argv[]) int opt = 1; int quit = FALSE; - srand(time(NULL)); + if (argc > 1) + { + srand(atoi(argv[1])); + } + else + { + srand(time(NULL)); + } initscr(); cbreak(); |