mirror of
https://github.com/mfocko/blog.git
synced 2024-12-23 21:01:29 +01:00
23 lines
367 B
C
23 lines
367 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <time.h>
|
|
|
|
#include "hangman.h"
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
if (argc != 2) {
|
|
printf("Usage: %s path-to-wordlist\n", argv[0]);
|
|
return 1;
|
|
}
|
|
|
|
char secret[50];
|
|
|
|
srand(time(NULL));
|
|
if (get_word(argv[1], secret) != 0) {
|
|
return 1;
|
|
}
|
|
hangman(secret);
|
|
|
|
return 0;
|
|
}
|