fix random seed initialization
This commit is contained in:
parent
3697a76f5f
commit
bd3ea26cfe
|
@ -2,6 +2,7 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#include <time.h>
|
||||
|
||||
enum {
|
||||
BOARD_SIZE = 10,
|
||||
|
@ -60,6 +61,8 @@ enum target {
|
|||
enum target check_hit(struct state state, struct position hit);
|
||||
|
||||
int main(void) {
|
||||
srand(time(NULL));
|
||||
|
||||
struct state state = generate_state();
|
||||
|
||||
while (!state.game_over) {
|
||||
|
|
Loading…
Reference in a new issue